DateTime field does not fire change event

DateTime field does not fire change event

RagnarGrootKoerkampRagnarGrootKoerkamp Posts: 48Questions: 14Answers: 1
edited January 2017 in Editor

Currently, a change event is not fired by default (ie by the library) when a date is selected in the datepicker popup.
The only way to achieve this is to set

 opts.onChange: function() { _triggerChange(input); }

but I think that's weird because other fields do fire change events when selected.

Replies

  • brendonsbrendons Posts: 39Questions: 14Answers: 1

    Hi Ragnar, Whereabouts in my code do I insert this snippet? I tried it in the field options and the editor options but no found joy.

    Thanks
    Brendon

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    It would be in the field object definition: datetime.

    However, it should have been addressed with the 1.6.0 release. From the release notes:

    datetime didn't trigger a change event when the value was selected with a mouse, resulting in issues with using dependent() with date/time fields.

    What version are you using?

    Allan

  • RagnarGrootKoerkampRagnarGrootKoerkamp Posts: 48Questions: 14Answers: 1

    This is quite old and not a problem anymore since we're using a different datepicker now.

This discussion has been closed.