Buy Now
Sign in

Date Picker in Modal Window doesn't work

artsapiens , August 24 at 22:13
A
artsapiens
Hi there!
I'm having problems right now. What I'm trying to do is to add calendar/datepicker fiield to my form, which opens in modal window. I installed your modal demo, removed all other fields and just added calendar field on normal screen and one same calendar field on modal.
Calendar on non-modal works just as intended:
Screen_Shot_2018-08-25_at_00.52.08.jpg
But the one in modal behaves strange - when clicked inside field, nothing happens:
Screen_Shot_2018-08-25_at_00.52.38.jpg
when clicked on label - opens datepicker over other calendar (which is behind overaly):
Screen_Shot_2018-08-25_at_00.52.46.jpg
Then I removed calendar from normal screen, and left only one in whole form - in modal popup. It stopped working completely. nothing opens whichever part of form I click. Simply no datepicker appears.
I attached backup of my test form.
I don't need two calendars. I only need one to work correctly in modal popup. Any ideas how to fix this?
Thanks in advance!
A
artsapiens
Hi there! any chances to solve this matter?
healyhatman
Does it not appear, or is it behind the modal window.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
A
artsapiens
As I described - when there are two instances, works the instance which is NOT in modal. When only modal's instance is left - it doesn't appear at all.
healyhatman
This is just a start because I have to go but it should help you out.
FIRST
Rename your second calendar, so it doesn't have the same name as the first one.
SECOND
Put this in a dom-ready custom JS block in your FIRST form (as in not the modal one)
jQuery('.ui.modal').modal({ onVisible: function() {jQuery("#calendar2").calendar(); } });
You'll need to do some tweaking but it should get your started.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
A
artsapiens
I'm not going to use two forms, only ONE. so the calendar will be one (in modal window). How to make it appear?
healyhatman
I meant "section". So under the designer tab, you have "one" and "two".
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
A
artsapiens
Ok, the code you provided does the job, but here are some details for those who may look for the solution:
1 - the code must be in same section where calendar is (i.e. modal). and
2 - the name "#calendar2" in part of provided code must be the same as your calendar element has:
Screen_Shot_2018-09-04_at_00.26.59.jpg
Just in case I attached working form as well, good luck for everyone having to fix same bug!
Thank you!
Attachments
Screen_Shot_2018-09-04_at_00.26.59.jpg
Screen_Shot_2018-09-04_at_00.26.59.jpg
(108.23 KiB)
106 Downloads/Views