I am trying to use a button to open the calendar linked to an Input box. When the function that shows the calendar ends the calendar closes. In fact, the only way to see the calendar is to stop the function with an alert(). This did not occur in version 2.0. Here’s a snippet of my code that reproduces this effect.
Lee
Try to change
onClick=“Doit()”/>
as
onClick="Doit(); (arguments[0]||event).cancelBubble=true; "/>
By default calendar is closing on any click on body. When you are clicking on a button, the next order of event is triggered
- button clicked
- calendar is created
- click reaches the body
- calendar is closed , as reaction on body-click
In case of linking to input calendar is closes on any click. Please check:
dhtmlx.com/docs/products/dhtmlxC … input.html
You can use inialization in div instead. In order to put selected values into the input you can use onSelect event handler.