datetime field with dependent, dependent function not executed on change

datetime field with dependent, dependent function not executed on change

rduncecbrduncecb Posts: 125Questions: 2Answers: 28
edited November 2016 in Bug reports

I seem to have found a bug in Editor regarding 'datetime' fields that have dependent function.

I have an editor field with a type of 'datetime', I have also set it up as a dependent field such that when a date is chosen I can modify some other field values.

The dependent function is executed when opening the editor dialog but a change event is not triggered when selecting/clicking on a date. Because a change event is not triggered the dependent function is not executed.

Test case:
http://live.datatables.net/miziyefe/2/edit?html,js,output

Adding the following code at line 7141 of dataTables.editor.js fixes the issue.

 that.dom.input.trigger( 'change', {editor: true, editorSet: true} );

Replies

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Thanks for flagging this up. I'm reasonably sure that I've got a fix for that in the 1.6 branch already, but I don't immediately see it in my commit list. Let me dig into it a bit and I'll post back with my findings!

    Thanks for posting the workaround!

    Regards,
    Allan

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Hi,

    Just to confirm - this fix will indeed be in v1.6. The issue was also seen when triggering time changes (if time input was configured) which has likewise been addressed.

    Many thanks again for letting me know about this!

    Regards,
    Allan

This discussion has been closed.