Hi,
I have an issue. I am using the DateTimeInput control to specify the date for an entry. I also use a jqxGrid to display some records that you can select.
When you select a record, the form loads with the record information. (This all happens on one page). I use $.Ajax({}) to get the selected record and then proceed to populate the form with the JSON returned data.
In my grid the date display as Day/Month/Year and that is how I need it displayed. When I click on a record, the DateTimeInput displayes the date as Month/Day/Year.
The returned date is in JSON format and I use the following line with “moment.js” in order to format the date to display Day/Month/Year.
var selectedDate = window.moment(data.srv_date).format(‘DD/MM/YYYY’);
I add an alert box and confirm that the date is correct. Now I need to DateTimeInput to display that date but it keeps changing it to Month/Day/Year!! Here is the code where I assign the value to the datetimeinput.
$(“#serviceDate”).jqxDateTimeInput(‘val’, selectedDate);
My DateTimeInput box is configured like so when the page loads
$(“#serviceDate”).jqxDateTimeInput({ width: 225, height: 25, theme: ‘web’, formatString: ‘dd/MM/yyyy’ });