I have the text field associated to Calendar object. mca

I have the text field associated to Calendar object.







    mcal1 = new dhtmlxCalendarObject(‘period’);

    mcal1.setSkin(“yahoolike”);



text field is populated from database. In my case the value inside period field is 2008-07-16



when I click on the text box, calendar pops up with current date.



How do I set the date of calendar to the date in text box?


Current version doesn’t take the data automatically you can set it as


mcal1 = new dhtmlxCalendarObject(‘period’);
mcal1.setFormatedDate("%Y-%m-%d",document.getElementById(‘period’).value);
mcal1.setSkin(“yahoolike”);