0

I'm currently using JQuery to display a datepicker front end. I've added a dateFormat so that it displays the date selected in a more commonly used Gregorian, day-month-year (DMY)format (code snippet below).

  $("#Filters_DateRangeFrom").datepicker({dateFormat: "dd-mm-yy"});

However when I debug I notice that the values passed in are being reversed. So say I enter 12/04/2014 - 15-04-2014, it will be shown as passing in 04-12-2014 -04-15-2014. The latter being 'null' as there is no 15th month.

It does the exact same if I take the dateFormat out. So on the front end its american and it gets reversed to english. Which works perfectly fine and brings up the correct data for the specified date ranges.

Any ideas on how to prevent the reversing of the formats?

PandaMX
  • 9
  • 1
  • This answer may help you: [DatePicker Format](http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format) – Matt D. Webb Apr 15 '15 at 07:01
  • How are you passing it to the back-end? Or the plugin `dateFormat` option is not working. Please post the whole code. – Shaunak D Apr 15 '15 at 07:06

0 Answers0