Datepicker In Modal
4 years ago
4 years ago
#1
Hi DC I cant get the datepicker to work inside a modal - appears to be a JS conflict. Cheers Gary
4 years ago
#2
Hello Gazbo, Can you post or describe the conflict, any errors? Is what you are describing is a modal in a modal? Possible solution is to have a different modal id Dan
4 years ago
#3
Cheers for that DC, thought it was something I was missing. Not urgent as its for a Create/Edit form for client and will divert to separate page until fix comes along. Kind regards Gary
3 years ago
#4
Hi guys. Lots of people struggle with this 'datepicker in a modal' issue but I have just got it to work by initialising the datepicker after the openModal function. At this point, the target text input control is 'in scope' and it pops up on demand and is behaving itself. I also tried bubbling-up the control's click event and it got messy. Anyway, it can be done.
I have wrapped the startup section of the trongate-datetime.js file in a new function and moved a few vars outside it. Then in my Ajax .done section I call openModal() and initTGDatePicker().
Here is the Ajax where I make the call:
Hope this helps and saves you some time. BTW Trongate is amazing - thank you David!
Regards, John.
I have wrapped the startup section of the trongate-datetime.js file in a new function and moved a few vars outside it. Then in my Ajax .done section I call openModal() and initTGDatePicker().
Here is the Ajax where I make the call:
Hope this helps and saves you some time. BTW Trongate is amazing - thank you David!
Regards, John.