mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBERF-4510 (#4131)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
f11d38c019
commit
4b28460540
@ -33,21 +33,22 @@
|
|||||||
getMonday,
|
getMonday,
|
||||||
getWeekDayName,
|
getWeekDayName,
|
||||||
resizeObserver,
|
resizeObserver,
|
||||||
showPopup
|
showPopup,
|
||||||
|
ticker
|
||||||
} from '@hcengineering/ui'
|
} from '@hcengineering/ui'
|
||||||
import { Menu } from '@hcengineering/view-resources'
|
import { Menu } from '@hcengineering/view-resources'
|
||||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
||||||
|
import type {
|
||||||
|
CalendarADGrid,
|
||||||
|
CalendarADRows,
|
||||||
|
CalendarCell,
|
||||||
|
CalendarElement,
|
||||||
|
CalendarElementRect,
|
||||||
|
CalendarGrid
|
||||||
|
} from '..'
|
||||||
import calendar from '../plugin'
|
import calendar from '../plugin'
|
||||||
import { isReadOnly, updateReccuringInstance } from '../utils'
|
import { isReadOnly, updateReccuringInstance } from '../utils'
|
||||||
import EventElement from './EventElement.svelte'
|
import EventElement from './EventElement.svelte'
|
||||||
import type {
|
|
||||||
CalendarGrid,
|
|
||||||
CalendarADGrid,
|
|
||||||
CalendarADRows,
|
|
||||||
CalendarElementRect,
|
|
||||||
CalendarElement,
|
|
||||||
CalendarCell
|
|
||||||
} from '..'
|
|
||||||
|
|
||||||
export let events: Event[]
|
export let events: Event[]
|
||||||
export let mondayStart = true
|
export let mondayStart = true
|
||||||
@ -65,7 +66,16 @@
|
|||||||
const client = getClient()
|
const client = getClient()
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
const todayDate = new Date()
|
let todayDate = new Date()
|
||||||
|
|
||||||
|
$: checkToday($ticker)
|
||||||
|
|
||||||
|
function checkToday (now: number): void {
|
||||||
|
if (!areDatesEqual(todayDate, new Date())) {
|
||||||
|
todayDate = new Date()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const ampm = new Intl.DateTimeFormat([], { hour: 'numeric' }).resolvedOptions().hour12
|
const ampm = new Intl.DateTimeFormat([], { hour: 'numeric' }).resolvedOptions().hour12
|
||||||
const getTimeFormat = (hour: number, min: number = 0): string => {
|
const getTimeFormat = (hour: number, min: number = 0): string => {
|
||||||
if (min === 0) {
|
if (min === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user