DataTables Editor DataTime Picker OnChange Event has no data.

DataTables Editor DataTime Picker OnChange Event has no data.

washuit-iammwashuit-iamm Posts: 43Questions: 20Answers: 1

Hello, regarding new $.fn.DataTable.Editor.DateTime() I noticed that the selected date is actually a property on the instance.

This is making some plugin development pretty difficult for us. The OnChange event has no arguments so we can not properly set up hoods with the Editor DateTime Field.

Can you please pass the selected date back when you internally call OnChange?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 48,908Questions: 1Answers: 7,132 Site admin
    Answer ✓

    I had expected that in instances like this you would just read the value directly from the input element that you've assigned for the date time input.

    Valid point though - it should also be executed in the scope of the instance so you could do this.val(). Noted for the next release.

    Allan

  • daniel_rdaniel_r Posts: 457Questions: 4Answers: 66

    @allan I will appreciate if you will pass another argument specifying the source element on which the DateTime was init (like that.dom.input)

  • allanallan Posts: 48,908Questions: 1Answers: 7,132 Site admin

    That makes sense - thanks. I'll look into that as well.

    Allan

  • daniel_rdaniel_r Posts: 457Questions: 4Answers: 66

    Thanks, another option could be to pass the value along with the arguments that are sent to the onChange, like this onChange: myFunctionName(event, someData)

    either way anything is welcome :smile:

  • Radoslav KonuchRadoslav Konuch Posts: 3Questions: 1Answers: 0

    Hey, this addition would really be appreciated ;)

Sign In or Register to comment.