From cb8c12d577b0743ffde9caa115688724cbf267bf Mon Sep 17 00:00:00 2001 From: Bram Brink Date: Mon, 7 Sep 2026 15:50:51 +0200 Subject: [PATCH 1/3] Improve reference date docs --- .../pages/input-widgets/date-picker.md | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md index ba04e072d8a..4753d7a9007 100644 --- a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md +++ b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md @@ -64,10 +64,28 @@ The possible values for date format are shown below: If you choose **Custom** as the date format (see above), this property determines how the value is formatted. The custom date format is a string that allows for any combination of symbols found in the table below. Any punctuation will be rendered literally. {{% alert color="info" %}} -When using `yyyy` custom format and typing `yy` in the date picker widget, the century guessing by proximity follows the rule of **50/50**. Specifically, it adjusts dates to be within 50 years before and 50 years after the time the date format instance is created: +When the custom date format uses `yyyy`, the date picker also accepts a two-digit year (`yy`). +{{% /alert %}} + +{{% alert color="info" %}} +The date picker uses a reference date for parsing partial date inputs (e.g. `mm/dd` or `yy/mm/dd`) into complete date inputs `yyyy/mm/dd`. The reference date is the date from the value already in the field. If the field is empty, the current date is the reference date. +{{% /alert %}} + +{{% alert color="warning" %}} +Starting with Mendix 12, the date picker will always use the current date as the reference date, even if the field already contains a value. +{{% /alert %}} + +{{% alert color="info" %}} +For two-digit year input, the date picker chooses the century that places the entered year closest to the reference year. If two years are equally close, it chooses the earlier year. + +For example, with `2026` as the reference year: * `24` {{< icon name="arrow-narrow-right" >}} `2024` -* `75` {{< icon name="arrow-narrow-right" >}} `1975` +* `75` {{< icon name="arrow-narrow-right" >}} `2075` +* `76` {{< icon name="arrow-narrow-right" >}} `1976` +* `97` {{< icon name="arrow-narrow-right" >}} `1997` + +If the field previously contained a date in `1970`, entering `24` results in `1924`. {{% /alert %}} {{% snippet file="/static/_includes/refguide/custom-date-format-tokens.md" %}} From 35982ff5792adcfe868e021dd227a0692759e60e Mon Sep 17 00:00:00 2001 From: ConnorLand <47385345+ConnorLand@users.noreply.github.com> Date: Wed, 23 Sep 2026 11:30:39 +0200 Subject: [PATCH 2/3] remove alert formatting --- .../pages/input-widgets/date-picker.md | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md index 4753d7a9007..969f0a87d9f 100644 --- a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md +++ b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md @@ -63,37 +63,20 @@ The possible values for date format are shown below: If you choose **Custom** as the date format (see above), this property determines how the value is formatted. The custom date format is a string that allows for any combination of symbols found in the table below. Any punctuation will be rendered literally. -{{% alert color="info" %}} -When the custom date format uses `yyyy`, the date picker also accepts a two-digit year (`yy`). -{{% /alert %}} - -{{% alert color="info" %}} -The date picker uses a reference date for parsing partial date inputs (e.g. `mm/dd` or `yy/mm/dd`) into complete date inputs `yyyy/mm/dd`. The reference date is the date from the value already in the field. If the field is empty, the current date is the reference date. -{{% /alert %}} - -{{% alert color="warning" %}} -Starting with Mendix 12, the date picker will always use the current date as the reference date, even if the field already contains a value. -{{% /alert %}} - -{{% alert color="info" %}} -For two-digit year input, the date picker chooses the century that places the entered year closest to the reference year. If two years are equally close, it chooses the earlier year. - -For example, with `2026` as the reference year: - -* `24` {{< icon name="arrow-narrow-right" >}} `2024` -* `75` {{< icon name="arrow-narrow-right" >}} `2075` -* `76` {{< icon name="arrow-narrow-right" >}} `1976` -* `97` {{< icon name="arrow-narrow-right" >}} `1997` - -If the field previously contained a date in `1970`, entering `24` results in `1924`. -{{% /alert %}} +Custom date formats, as well as date handling in general, are tricky technologies with real business ramifications. Be aware of the following behaviors when using this widget: + +* When the custom date format uses `yyyy`, the date picker also accepts a two-digit year (`yy`). +* The date picker uses a reference date for parsing partial date inputs (for example `mm/dd` or `yy/mm/dd`) into complete date inputs `yyyy/mm/dd`. The reference date is the date from the value already in the field. If the field is empty, the current date is the reference date. +* For two-digit year input, the date picker chooses the century that places the entered year closest to the reference year. If two years are equally close, it chooses the earlier year. + * For example, with `2026` as the reference year (if the field previously contained a date in `1970`, entering `24` results in `1924`): + * `24` {{< icon name="arrow-narrow-right" >}} `2024` + * `75` {{< icon name="arrow-narrow-right" >}} `2075` + * `76` {{< icon name="arrow-narrow-right" >}} `1976` + * `97` {{< icon name="arrow-narrow-right" >}} `1997` +* Even though a date picker with a custom date format is editable, the calendar drop-down button will only be shown if the custom format represents a full date (that is, the year [`y`-`yyyy`], month [`M`-`MMMM`], and day of month [`d`-`dd`] tokens are all present in the custom format). {{% snippet file="/static/_includes/refguide/custom-date-format-tokens.md" %}} -{{% alert color="info" %}} -Even though a date picker with a custom date format is editable, the calendar drop-down button will only be shown if the custom format represents a full date (that is, the year [`y`-`yyyy`], month [`M`-`MMMM`], and day of month [`d`-`dd`] tokens are all present in the custom format). -{{% /alert %}} - #### Placeholder Text The placeholder text is shown if the date value is empty. It can be used to give the end-user a hint as to the expected format. From b7e3ae10ac4367826aa02d5b3c003ca63c027f65 Mon Sep 17 00:00:00 2001 From: ConnorLand <47385345+ConnorLand@users.noreply.github.com> Date: Wed, 23 Sep 2026 11:32:07 +0200 Subject: [PATCH 3/3] replace em dashes with en dashes --- .../docs/refguide/modeling/pages/input-widgets/date-picker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md index 969f0a87d9f..9f45ec943a7 100644 --- a/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md +++ b/content/en/docs/refguide/modeling/pages/input-widgets/date-picker.md @@ -73,7 +73,7 @@ Custom date formats, as well as date handling in general, are tricky technologie * `75` {{< icon name="arrow-narrow-right" >}} `2075` * `76` {{< icon name="arrow-narrow-right" >}} `1976` * `97` {{< icon name="arrow-narrow-right" >}} `1997` -* Even though a date picker with a custom date format is editable, the calendar drop-down button will only be shown if the custom format represents a full date (that is, the year [`y`-`yyyy`], month [`M`-`MMMM`], and day of month [`d`-`dd`] tokens are all present in the custom format). +* Even though a date picker with a custom date format is editable, the calendar drop-down button will only be shown if the custom format represents a full date (that is, the year [`y`–`yyyy`], month [`M`–`MMMM`], and day of month [`d`–`dd`] tokens are all present in the custom format). {{% snippet file="/static/_includes/refguide/custom-date-format-tokens.md" %}}