Date field modify data

Date field modify data

lcoglcog Posts: 24Questions: 5Answers: 0

I have a date field that I want to accept different input styles for. Where would I intercept the value before it gets sent to the server for inserting into the database? I am looking at the Editor event "preSubmit", but I was hoping for something when the date field loses focus, is that possible?

Replies

  • allanallan Posts: 61,663Questions: 1Answers: 10,095 Site admin

    You can assign a handler to the blur event using:

    editor.field('myField').input().on('blur', function () {
      ...
    } );
    

    field().input() gives the input element for the field (wrapped in a jQuery instance).

    Allan

  • lcoglcog Posts: 24Questions: 5Answers: 0

    Thank you.

This discussion has been closed.