Buy Now
Sign in

Separate Date and Time Pickers

har7801 , April 29 at 14:27
H
har7801
Im almost there, one last hurdle to complete my masterpiece.
I am trying to have a seperate date picker, I have no problem getting this to work, and a separate time only picker, this is where I am falling down.
Screengrabs attached for reference.
I have changed formats, changed field names, changed everything, but just can't get it to do time. The picker itself works fine, but it puts todays date into the field instead of the time, then nothing is sent to the DB.
Can I not have 2 of these pickers in one form?
Thanks.
H
har7801
Settings.JPG

​​
Time_Selector.JPG
Attachments
Settings.JPG
Settings.JPG
(50.34 KiB)
70 Downloads/Views
Time_Selector.JPG
Time_Selector.JPG
(33.19 KiB)
73 Downloads/Views
H
har7801
So I think I remember from days past that I could only have one picker, so I have settled on just doing a text field to collect the time that way. I am entering this:
data-inputmask:'mask' : '23:59'
into the extra attributes field but it doesn't restrict the input. Am I missing a step.
This is in CCv6
Ta
H
healyhatman
You can have two date pickers, one problem is you put the PHP format string in Format - you need to use the Moments.js format in that field.
Here's a list I made
https://www.chronoengine.com/forums/posts/t105375/calendar-date-format-options
Or here's the official page
https://momentjs.com/
The other problem is that it appears the calendar in CC is bugged, and it doesn't have all the properties set correctly.
One way you might be able to get around it is by creating a Calendar VIEW, and in your Fields view instead of adding a calendar there add a "Custom" element, with {view:yourcalendar}. At least until they fix it.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
har7801
Thanks, these are the setting I now have in the dialogue boxes, it will now write to the DB, the picker for time comes up with time only, the hours first then the minutes, but when you select them it only copies in today's date, even though you didnt select a date?
Settings.JPG
Attachments
Settings.JPG
Settings.JPG
(51.58 KiB)
63 Downloads/Views
H
healyhatman
It appears to be bugged. I edited my first reply with some suggestions, and created a post in the CC Bug subforum.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
har7801
Ok, as long as its not just me. Any suggestions on the setting a data mask instead?
H
healyhatman
Yeah one suggestion: don't. Certain combinations break input on Android devices.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman