setPosition dont work

<?php echo $txtDataArrivo ?>

<?php echo $txtDataPartenza ?>

position botton for imput?

setPosition method should be called after draw() method:



Here 100 is vertical position, 50 is horizontal: calendar.setPosition(Y,X).

setPosition dont work (4.88 KB)

If you attach calendar to input, setPosition doesn’t affect - position is set automatically in this case.

If you want to define custom position for the calendar, you should initialize calendar in some container:

mCal = new dhtmlxCalendarObject(‘dhtmlxCalendar’);


and set onclick event handlers for the necessary inputs to hide/show calendar:

mCal.hide(); /;

if I do as you wrote I lose the connection with the input field, how do avoid it?

If calendar is initialized in div, you can set onSelect event handler and put the chosen date into the necessary input. Please check the sample dhtmlxCalendar/samples/02_date_formating/01_calendar_date_format.html


document.getElementById(“dataIN”).value = calender.getFormatedDate();