Feature request: Reset button for <input type="DateTime">

Hi guys,

Navigating dates (specially with time) is always such a hassle. It would be great if there would be a “reset”-button on the input widget for DateTime.

I would like it to reset the date to whatever was specified in <default></default>. Specifically I would love if could be reset to now (if that was what I specified).

I imagine it looking something like this:


– Tom Arild


Hey Tom Arild

Good feature request, you are not the first one to request this. We have a simular feature request on getting a “now” button to the datepicker. The design and functionality is not set in stone, but as far as i can tell we would add “now” as a button and set the date to the current date if no default is selected.

Would something like this work or does that not overlap with this feature request?

Hi Persijn,

If I understand you correctly I think there is a difference here:

  1. The “Now”-button sets an empty field to the current date
  2. The “Reset”-button takes a field which has a date already (because it would be populated if <default></default> exists), but replaces it with a new date based on the contents of <default> from the content type xml.

The use case I have that led me to suggest this feature is that I have a field in my content type for when the article has been “editorally modified”. This field is set manually, since we don’t want to include changes like fixing typos.

Having a “Now”-button would solve my use case (if it can overwrite the current value), but resetting to <default></default> might be more powerful for other use cases. Specially when using math like described in the DateTime-input documentation.

1 Like

Hi Tom, We already have this in the backlog :slight_smile:

1 Like

@tom We have started working on this feature. If we implement the Reset button then this button will revert the changes done since the last modification, which means:

  1. If date input has a <default> value and didn’t have a value previously saved in the content, then Reset will change to the default value (what was discussed earlier in this thread), but
  2. If date input already had another value saved in the property set (which may be different from the default one), then Reset will revert to that. Otherwise it will be confusing for end-user if Reset button changes not to the value user initially saw in the field but to some previously unseen value (from <default>).

So basically, Reset will revert to the last saved value OR default (if it’s set in the schema and no previous value was saved).

After further discussion we got another idea - we call the button “Set default” and we only show it when there’s default value set in the XML schema.

Otherwise (as described above) “Reset” behaviour will be confusing. User can already now reset changes made to the initial value by clicking Escape button while the datepicker dialog is open.


This has been implemented, and will be shipped with CS 4.1 (ETA this april)