I am trying to open a form having a DateTextField which must be populated with record from database. And I am having no luck of doing it. I already test my code this way :
dijit.byId("jurnal_date").attr("value", new Date(2011,1,1))
Just to test the basic way of setting a DateTextField. But the value won’t get entered into DateTextField. What did I do wrong? Here is the DateTextField declaration:
<input type="text" name="jurnal_date" id="jurnal_date" required="true" dojotype="dijit.form.DateTextBox" />
Thanks!
Ah, I just resolved my own problem. Here is the answer :
So, we can only set the value of a DateTextField, after its dialog/form is shown.
Well, this is my conclusion after solving this problem 🙂
Thanks.