Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Apr 28, 2008 06:27
open dhtmlx forum
Hi I am using the sensitive Date calendar , while clicking on the calendar icon and selecting the Date , value ...

Hi

I am using the sensitive Date calendar , while clicking on the calendar icon and selecting the Date , value is getting displayed on textbox ,I need to place default sysdate in the text field and also sysdate-30 as deafult in another textbox.
Can you please let me know how I can achieve this.

Thanks
Harikishan
Answer posted by Support on Apr 28, 2008 07:16
You can attach any custom code to onclick event

    calendar.setOnClickHandler(function(date){
          document.getElementById("inputA")=this.getFormatedDate("%d/%m/%Y",date);
          document.getElementById("inputB")=this.getFormatedDate("%d/%m/%Y",new Date(date.valueOf()-60000*60*24*30));
          return true;
    });