Hello,
can anyone help me to set a value to a DateTime Picker field with javascript?
I've tried:
but it does not work.
Thanks
Guido
can anyone help me to set a value to a DateTime Picker field with javascript?
I've tried:
var MyDate = new Date('2012-03-12');
document.getElementById('Data_Control').value = MyDate;
but it does not work.
Thanks
Guido
Hi Guido,
What exactly do you need to do?
In your code MyDate is a JavaScript date object not a string. using toString() might work.
You can certainly set a date using JavaScript to update the DatePicker directly but not with the standard ChronoForms code as it doesn't name the datepicker object (or rather I've never found out how to access it).
Bob
What exactly do you need to do?
In your code MyDate is a JavaScript date object not a string. using toString() might work.
You can certainly set a date using JavaScript to update the DatePicker directly but not with the standard ChronoForms code as it doesn't name the datepicker object (or rather I've never found out how to access it).
Bob
Thanks GreyHead,
I've resolved setting to "Mootools Datepicker" in the form configuration.
Thanks again.
Guido Sabatini
I've resolved setting to "Mootools Datepicker" in the form configuration.
Thanks again.
Guido Sabatini
This topic is locked and no more replies can be posted.