I have a form with a Datepicker field, I want to set the value of date field in pre_display action hook and trigger a change event on the datefield programmatically. I referred to the previous sample to retrieve the Datefield using javascript. It just returned undefined. If I put the code in Setting->Custom Javascript, it could show the object.
How do I get the Datepicker object in pre_display filter hook?