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?