Forums

Two Questions about the date/time box

evilsnoop 18 Mar, 2012
1) Is it possible to prevent someone from picking past dates? I would like only the current and future dates to be click-able.

2) Is it possible when using the Time Picker to have standard 12 hours and an option to also pick (AM/PM)?
GreyHead 18 Mar, 2012
Hi evilsnoop ,

Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6/1.7/2.5.

Bob
evilsnoop 18 Mar, 2012
Am using chronoform V4 RC3.21 and joomla 2.5.. ok I found out how to block the dates but am still wondering on the standard 12hour time and the AM/PM
GreyHead 19 Mar, 2012
Hi evilsnoop ,

As far as I can see from the DatePicker documents there is no official support for a 12 hour time picker with am/pm :-(

Hunting around I found a modified version here where someone has added an 'ampm' option.

Bob
lydiab 23 May, 2012
Could you let us know how you managed to block the dates so the user cannot click on the past dates ?
thanks
GreyHead 23 May, 2012
Hi LydiaB.

Please see this post (and the rest of the thread). The solution here is using the MooTools datepicker which is an option on the Form General tab.

Bob
lydiab 23 May, 2012
Great, it works, thanks
lydiab 23 May, 2012
Ok now that it is working with a specific date, how can I set it to today's date ?

thanks
GreyHead 23 May, 2012
Hi LydiaB,

Please see the second example "To specify a start date of today and block all past dates for example"

Bob
lydiab 25 May, 2012
thanks a lot, we getting there.
Now the picked date cannot be in the past.

Just the last little problem : if I choose Moo Datepicker style Dashboard or Vista, when clicking on the box the calendar appears but only until the 19th of the month.
The last days of the month are missing.
any idea ?
GreyHead 25 May, 2012
Hi lydiab,

Please post a link to the form so I can take a quick look.

Bob
lydiab 25 May, 2012
I have three sites with 6 months ago validated version of Chronoforms
http://www.patmos-holiday.com/booking-enquiries.html
http://www.malawi-travel.com/en/booking-enquiries.html
http://www.lindos-holiday.com/en/booking-enquiries.html

I could never block out past dates in those.

Now I am trying to use the new version of Chronoforms on
http://www.zambia-safari.com/en/booking-enquiries.html

which I am planning to validate as soon as everything is working fine.
You can see on this latest link that in the field Date of arrival (one of the fields towars the bottom)
the dates go to 19 and stop.

thanks
GreyHead 26 May, 2012
Hi lydiab,

The problem is this line in the beez5.css around line 1173
table {
    border: 1px solid #DDDDDD !important;
}
it's adding a border round the datepicker table and forcing all the dates down and out of sight.

You may be able to over-ride it with this code in a Load CSS action
table.days {
  border: none !important;
}

Bob
lydiab 26 May, 2012
Wonderful !
thanks
This topic is locked and no more replies can be posted.