Date field modify data

Date field modify data

lcoglcog Posts: 22Questions: 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: 49,068Questions: 1Answers: 7,175 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: 22Questions: 5Answers: 0

    Thank you.

Sign In or Register to comment.