ExtJS and Updating old dates

LabKey Support Forum
ExtJS and Updating old dates Nick Kerr  2013-08-06 10:01
Status: Closed
 
Hi Trent,

When using Ext4.Date.parse it acts as a matching function which will return a Date object if the input value matches the date format supplied. This might have been why it did not work with "dd/mm/yyyy" since the input might not have been in this format.

If you are looking to get a Date object I'd recommend handing the input value to a new Date object (e.g. new Date(inputValue); ). ExtJS provides a lot of utility functions for dealing with Date objects (see all the methods on Ext.Date) and using Ext.Date.format can give you the output string you are looking to display.

Thanks,
Nick