Today + 1 day

Dear DhtmlX support Team!



I would like make a onclick like: “var currentTime = new Date()

var month = currentTime.getMonth() + 1”;



The code is





function jotallasutolso(date) {

        document.getElementById(‘jotallasutolso’).value = cal_jotallasutolso.getFormatedDate(null,date);

        document.getElementById(‘cal_jotallasutolso’).style.display = ‘none’;

        dateFrom = new Date(date);



var month = dateForm.getDate() + 1;

document.getElementById(‘biztkezdete’).value = month;

        return true;}



thanks your answer!

The date objext allows month manipulation, so you can get it as
    var date = new Date();
    var nextdate = date.setMonth(date.getMonth+1); // getDate  and setDate if you need a next day

If you need to get next month as its text representation, it can be done as
    var nexttext =  cal_jotallasutolso.getFormatedDate("%M",nextdate)


I don’t understand clealyr :slight_smile:



here is my code:



function waranty_last(date) {
  document.getElementById(‘warantylast’).value = cal_warantylast.getFormatedDate(null,date);
  document.getElementById(‘cal_warantylast’).style.display = ‘none’;
  dateFrom = new Date(date);
  var nextdate = date.setDate(date.getDate+1);
  document.getElementById(‘insurance_firstdate’).value = cal_jotallasutolso.getFormatedDate(null,nextdate);
  return true;}



i would like this output if warantylast=2008.07.13



                                   insurance_firstdate = 2008.07.14



 



thanks



 

Pleas check attached sample

1216378513.zip (21.2 KB)