Hello,
How can i set the focus to a webdatepicker using javascript ?
I tried this:
var dateObj = igedit_getById(datePickerName);
if (dateObj != null)
{
dateObj.setFocus();
}
But I have an error on igedit_getById because it is unknow
And I tried this but not working:
var dateObj = $find(datePickerName);
Thanks,
Antonio
Hi Antonio,
Thank you for posting in the community.
As WebDatePicker is part of the new AIKIDO toolset, it can be accessed on the client through ig_controls. Alternatively you may try accessing it by its client id. Below is some sample code illustrating these approaches:
ig_controls.WebDatePicker1.setFocus(); $find('<%= WebDatePicker1.ClientID %>').setFocus();
$find('<%= WebDatePicker1.ClientID %>').setFocus();
Please let me know if you have any questions.
I didn't know ig_controls !
Thanks, it's works !
Thank you for your reply.
Glad that your issue has been resolved. Please feel free to contact me if I can be of further assistance.