Closed GoogleCodeExporter closed 8 years ago
Replace:
from_date = new Date("2010", "10", "24").toString();
With:
from_date = new Date("2010", "10", "24").asString();
The native toString() method on date objects returns a long string which is
language and culture dependent. We provide as asString method which converts a
Date object to a string based on your current Date.format.
Original comment by kelvin.l...@gmail.com
on 26 Nov 2010 at 9:56
Thanks! It works this way.
I originally used asString() method, but created my from_date so
from_date = new Date("2010-10-24 00:00").asString();
Such code also generates an error in Firefox. Maybe this information will be
useful for someone.
Original comment by fra...@gmail.com
on 26 Nov 2010 at 10:02
You could have done:
from_date = Date.fromString('2010-10-24').asString();
(assuming Date.format == 'yyyy-mm-dd')
If you are actually trying to set a specific date then there is no need to get
a date object involved at all. You could just have done:
$obj.dpSetSelected('2010-10-24');
(again, assuming that Date.format is set to 'yyyy-mm-dd' - the thing to
remember is that your string dates need to be in the same format as Date.format)
Original comment by kelvin.l...@gmail.com
on 26 Nov 2010 at 10:06
Original issue reported on code.google.com by
fra...@gmail.com
on 26 Nov 2010 at 9:47