Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael F. on Nov 25, 2008 03:25
open dhtmlx forum
Multiple Date input fields - attach to one Calender object?

Hello,

i´ve the following problem:

I´ve multiple Date Input Fields on my site. Each with a Calendar Icon Gif and each with its own unique ID

I would like to make on Calendar instance an open the one calender onclick of the gif.

But, i couldn´t found a solution to dynamic attach the input field to the calendar.

I thought ".setParent(inputfieldID)" could be the solution, but it seems not to work?

What can I do to realize it?

Or must i create for each calendar input field one own and full declaration of a dhtmlx Calendar object?

Answer posted by Support on Nov 25, 2008 03:54
There is no way to dynamically attach calendar object to different inputs, but you can

- create separate calendar object
- attach handler to icons which will call calendar.show()
- attach setOnClickHandler so it will return data after selection in calendar to last clicked input