issue with date type field
issue with date type field
datetime format field
if (obj.t=="datetime"){
fieldobj[index] = {
label: obj.d,
name: obj.i,
className: obj.c,
type: "datetime",
def: function () { return new Date(); },
format: 'YYYY-MM-DD HH:MM:SS',
fieldInfo: 'Euro style date with 24 hour clock'
};
2 issues, first, the calendar picker that appears, changing the hour updates the input field, but changing the minute does NOT update the input field, feels like a bug
second, how can I ensure that the def: def: function () { return new Date(); },
returns a date in a specific time zone? thank u very much
This question has an accepted answers - jump to answer
Answers
It appears to work okay in this example. Can you link to a page showing the issue please?
new Date()
will create a date object in the time zone the host browser is set to. If you want to create a UTC date object, use Date.UTC.Allan
Thank you Allan, this is now resolved, we can close it, thank you