How can I set a date in the date picker? I've tried this, but I can only set the value attribute which is not used (always empty after choosing a date):
$(".datePicker").find('input').attr('value', '2012-05-14');
Thanks for your help!
How can I set a date in the date picker? I've tried this, but I can only set the value attribute which is not used (always empty after choosing a date):
$(".datePicker").find('input').attr('value', '2012-05-14');
Thanks for your help!
What do you mean it's always empty after choosing a date..?
After selecting a date in the date picker, the value attribute of the input tag has no value/is empty.
You set the date via calendar popup, date is set into the input field and then you want to read the value with JavaScript?
Yes. I want to know how to read and set the value with JavaScript.
Something is wrong with the selector, this works:
code
$('input').attr('value', '2012-05-14');
/code