jQWidgets Forums

jQuery UI Widgets Forums Grid Validate mindate and maxdate between two columns

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • gonley
    Participant

    When I edit a row with start date or end date, how do I get the value of another column in the same row and compare each other so that start date won’t be after end date and end date won’t be before start date using validation?


    Peter Stoev
    Keymaster

    Hi gonley,

    If you use Cell Editing, you may use the “getcellvalue” for getting the value of another Cell. If you use Popup Editing, then you may get the DateTimeInput’s Values using the “val” method of DateTimeInput before clicking the “Save” button. For “Full Row” edit, you will have to add “createeditor” callback functions to your Date columns, then bind to “change” event of jqxDateTimeInput and add some custom variables which save the current DateTimeInput value in its “change” handler. In the columns “validation” callback functions, compare your custom variables and return true or false depending on the result.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.