submit inline datepicker on clicking a date

submit inline datepicker on clicking a date

wouterwouter Posts: 22Questions: 7Answers: 0

He everyone!

I have an inline editor with a date picker. I would like to "auto" submit the field when i click a date in the datepicker. So i added an "on change" event like so:

    editor.field( 'data' ).input().on( 'change', function (e) {
      editor.submit();
      });

however, this event is also triggered when opening the datepicker. so when it opens it directly submits the value and closes the editor. anyone else found a solution for this?

thanx!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @wouter ,

    I think this should be doing what you're after. It's a bit convoluted due to a bug that was found (DD-893 for my reference), but it's scheduled to be fixed in the next release of Editor (1.9.1). In the meantime, that example I posted will hopefully do the trick,

    Cheers,

    Colin

  • wouterwouter Posts: 22Questions: 7Answers: 0

    He @colin,

    Thank you!!! that does the trick!

This discussion has been closed.