From b609719e318603abc59ca19c8f414367c9090166 Mon Sep 17 00:00:00 2001 From: dreaming-augustin Date: Mon, 23 Dec 2024 11:59:23 +0800 Subject: [PATCH 1/5] [Calendar] Document usage scope of format tokens --- server/documents/modules/calendar.html.eco | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/server/documents/modules/calendar.html.eco b/server/documents/modules/calendar.html.eco index bef37362d..72938d22e 100644 --- a/server/documents/modules/calendar.html.eco +++ b/server/documents/modules/calendar.html.eco @@ -339,6 +339,8 @@ themes : ['Default']

Custom format

You can entirely change the date format by using a token string formatter.

+

The format is applied to the calendar cells.

+

These same tokens can be used to format the date gotten through @@ -982,8 +984,9 @@ themes : ['Default'] Clear the selected date - get date - Get the selected date + get date(format = '') + Get the selected date. + If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. set date(date, updateInput = true, fireChange = true) @@ -998,24 +1001,27 @@ themes : ['Default'] Set the current selection mode (year, month, day, hour, minute) - get startDate - Get the start date for range selection + get startDate(format = '') + Get the start date for range selection. + If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. set startDate(date) Set the start date for range selection - get endDate - Get the end date for range selection + get endDate(format = '') + Get the end date for range selection. + If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. set endDate(date) Set the end date for range selection - get focusDate - Get the currently focused date + get focusDate(format = '') + Get the currently focused date. + If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. set focusDate(date) From da466bbf9b64b07608f89a9f51c0e224615e8090 Mon Sep 17 00:00:00 2001 From: dreaming-augustin Date: Mon, 23 Dec 2024 12:07:35 +0800 Subject: [PATCH 2/5] [Calendar] Capitalize: JavaScript Date object --- server/documents/modules/calendar.html.eco | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/documents/modules/calendar.html.eco b/server/documents/modules/calendar.html.eco index 72938d22e..97fd2919e 100644 --- a/server/documents/modules/calendar.html.eco +++ b/server/documents/modules/calendar.html.eco @@ -986,7 +986,7 @@ themes : ['Default'] get date(format = '') Get the selected date. - If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. + If format is omitted, a JavaScript Date object is returned, otherwise a formatted string is returned. set date(date, updateInput = true, fireChange = true) @@ -1003,7 +1003,7 @@ themes : ['Default'] get startDate(format = '') Get the start date for range selection. - If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. + If format is omitted, a JavaScript Date object is returned, otherwise a formatted string is returned. set startDate(date) @@ -1012,7 +1012,7 @@ themes : ['Default'] get endDate(format = '') Get the end date for range selection. - If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. + If format is omitted, a JavaScript Date object is returned, otherwise a formatted string is returned. set endDate(date) @@ -1021,7 +1021,7 @@ themes : ['Default'] get focusDate(format = '') Get the currently focused date. - If format is omitted, a JavaScript date object is returned, otherwise a formatted string is returned. + If format is omitted, a JavaScript Date object is returned, otherwise a formatted string is returned. set focusDate(date) From e720b8ee656da96539ae00d7a192c31f9b9798e5 Mon Sep 17 00:00:00 2001 From: dreaming-augustin Date: Thu, 26 Dec 2024 20:19:24 +0800 Subject: [PATCH 3/5] Date tokens in formatter settings --- server/documents/modules/calendar.html.eco | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/documents/modules/calendar.html.eco b/server/documents/modules/calendar.html.eco index 97fd2919e..6009ecee3 100644 --- a/server/documents/modules/calendar.html.eco +++ b/server/documents/modules/calendar.html.eco @@ -339,8 +339,8 @@ themes : ['Default']

Custom format

You can entirely change the date format by using a token string formatter.

-

The format is applied to the calendar cells.

-

These same tokens can be used to format the date gotten through formatter settings, like calendar cells.

+

These same tokens can be used to format the date gotten through From f285af69b004340bd3bddb6c14e9ba7238d9df9c Mon Sep 17 00:00:00 2001 From: dreaming-augustin Date: Thu, 26 Dec 2024 21:15:23 +0800 Subject: [PATCH 4/5] Update server/documents/modules/calendar.html.eco Co-authored-by: Marco 'Lubber' Wienkoop --- server/documents/modules/calendar.html.eco | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/documents/modules/calendar.html.eco b/server/documents/modules/calendar.html.eco index 6009ecee3..5bcd63f06 100644 --- a/server/documents/modules/calendar.html.eco +++ b/server/documents/modules/calendar.html.eco @@ -339,7 +339,7 @@ themes : ['Default']

Custom format

You can entirely change the date format by using a token string formatter.

-

The format is applied to several date outputs mentioned as tokens in the formatter settings, like calendar cells.

+

The format is applied to several date outputs mentioned as tokens in the formatter settings.

These same tokens can be used to format the date gotten through Custom format

You can entirely change the date format by using a token string formatter.

The format is applied to several date outputs mentioned as tokens in the formatter settings.

-

These same tokens can be used to format the date gotten through behaviors, like 'get date'.

Tokens are placeholder characters for a specific output format. Fomantic-UI supports the following tokens: