Releases: nhn/tui.calendar
v1.15.3
v1.15.2
v1.15.1
v1.15.0
v1.14.1
v1.14.0
v1.13.1
v1.13.0
Features
In regions with daylight saving time (DST), such as New York, the schedule is modified to always appear in the same location regardless of summer time/standard time.
I received a timezoneOffset
value as an option to set the secondary time zone in the weekly/daily view. If the offset value is fixed and used, in an area with two offsets (e.g. New York), the time of the previously created schedule is displayed incorrectly according to the timezone.
To improve this, a new timezone
option is added. You set the list of time zones in the zones
property. timezoneName
is essential as timezone information (e.g. 'Asia / Seoul', 'America / New_York') is required to calculate the offset. By default, the input timezoneName value. Internally, the offset can be calculated using the JavaScript standard specification Intl.DateTimeFormat
. Alternatively, you can use the offsetCalculator
property to pass the timezone name and time(ms) as parameters and get the exact offset of that time in that time zone.
Existing (1.12.14 and below)
timezones
options will be deprecated.
AS-IS
const cal = new Calendar(el, {
...
timezones: [
{
tooltip: 'Seoul',
displayLabel: 'GMT+09:00',
timezoneOffset: 540
},
{
tooltip: 'New York',
displayLabel: 'GMT-05:00',
timezoneOffset: -300
},
]
});
TO-BE
const cal = new Calendar(el, {
timezone: {
zones: [
{
timezoneName: 'Asia/Seoul',
tooltip: 'Seoul',
displayLabel: 'GMT+09:00'
},
{
timezoneName: 'America/New_York',
tooltip: 'New York',
displayLabel: 'GMT-05:00'
},
]
}
});
If you define the offsetCalculator
property, the offset calculation is done with this function.
The offsetCalculator
option allows you to set up a function that returns the timezone offset for that time using date libraries like js-joda and moment-timezone.
The offsetCalculator
option is useful when your browser does not support Intl.DateTimeFormat
and formatToPart
, or you want to use the date library you are familiar with.
const cal = new Calendar(el, {
timezone: {
zones: [
...
],
offsetCalculator: function(timezone, timestamp){
// matches 'getTimezoneOffset()' of Date API
// e.g. +09:00 => -540, -04:00 => 240
return moment.tz.zone(timezone).utcOffset(timestamp);
},
}
});
If you are using a custom time zone, you need to add polyfills if all of the following are true.
- Browser does not support
Intl.DateTimeFormat
andformatToPart
. - The
offsetCalculator
option is not defined. - Your service supports Internet Explorer.
Fix
- 6d4d635 Feat: : when you do not set a custom timezone, the schedule will always be displayed the same. (#423, #671)
Enhancement
- 1318406 Refactor: update example code
Documentation
- 4fef784 Docs: add timezone option
v1.12.14
Bug Fixes
- 210d6ac Fix: setInterval callbacks error when from inactive tabs to active tabs (resolve #601)
- 6e0e133 Fix: always undefined
location
value of createtion-schedule-popup(fix #615). Thanks @gayeon1025 - fc55ad8 Fix: make sure the top of scheduleDetailPopup is non-negative (#638)
- 6440bad Fix: fixed a bug that was displayed as a all-day schedule when the end time is 00:00 in a schedule within one day(#641)
- 433bbe4 Fix: the issue that updateschedule wont update
isReadOnly
property (#645). Thanks @figofan - c9bc4a7 Fix: monthview content missing while draging all-day schedule(fix #673). Thanks @lhysdl
- 1512dc6 Fix: always consider timezone when set allday schedule period(fix #662) (#667). Thanks @lhysdl
- d056190 Fix: resolve schedule rendering issues on month view (#646)
- 44ebf62 Fix: update
attendees
of schedule(#690) - 5a524e2 Fix: resolve setAllDayPeriod logic(fix #662)
Enhancement
- 2c7acd2 Refactor: : Remove not needed util.bind
- d535ccd Refactor: remove unused Collection.merge() (#619)
- 3697672 Perf: remove unused vendor and mpzero stylus functions (#623)
- de3ecf8 Perf: remove unused Collection.or() (#624)
- e125cb2 Perf: css/popup.styl: compress two identical sections into one
- dfe8541 Perf: variables.styl: remove unused Taskview and AllDay prefixes (#635)
- c567e5a Perf: remove unused css/icons.styl: ic-public
- ad71a41 Refactor: remove unused first/lastIn2Array function
Thank you for your contributions to all the refactoring work for legacy code. @dilyanpalauzov
Documentation
v1.12.13
Bug Fixes
- 344629c Fix: resolve handlebars condition using 'or' custom operator (fix #470 )
- c233b6c Fix: when move to prev calendar in monthly view resolve incorrect displayed range text date label on examples (fix #553 )
- 66f71c7 Fix: check defined properties on beforeUpdateSchedule(fix #463)
- 7401332 Fix: resolve broken TC
- d8ef5d5 Fix: resolve schedule block position(fix #539)
- b1de55f Fix: set updated category(fix #589 )
- 91d9b57 Fix: resolve detail popup position in case of long time schedule(fix #592)
- 8a70e1d Fix: resolve broken arrow top position(fix #593)
- a9f83d7 Fix: resolve creation popup position for long schedule block