set editor (datetime) field options after .on() event

set editor (datetime) field options after .on() event

crush123crush123 Posts: 417Questions: 126Answers: 18

I am using the bootstrap datetimepicker 2 plugin for editor and on selecting a startdate input value, i would like to set the minDate for the enddate, so that the user cannot select an end date before the start date.

Using API fields, I can set a field value and a default value in this way, but can't set a field's option values

Is this possible ?

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    You can pass in an opts property (documentation) which is passed to the date picker for its initialisation. So you should be able to set the min date there assuming that that library has a min date initialisation option (presumably it does).

    Allan

This discussion has been closed.