How to disable the past dates of my calendar??

laki 10 Feb, 2012
Hi,

I'm using ChronoForm 1.3/ V3.1 RC5.2, and I need to disable the past dates of my calendar. I'm using this form for a reservation site so it should active only present date and future dates. How can I do it? And past dates should be disable to select too.
GreyHead 10 Feb, 2012
Hi laki,

You can use the direction option in the DatePicker Options box on the form general tab. if you use
{ direction: 1 }
the calendar will only accept future dates. See more here

Bob

NB for other readers, this does not work for the ChronoForms v4 calendar.
laki 14 Feb, 2012
Hi,

Thanks for your reply. I need small help from you. Where do i need to put that code? I upload a file please let me is that d correct place to do the change.
GreyHead 14 Feb, 2012
Hi laki,

Yes that the right box. Try
classes: ['dashboard'], direction: 1

Bob
laki 14 Feb, 2012
Hi Bob,

I try it, But it doesn't work for me. Did I miss anything? Please help me.
GreyHead 14 Feb, 2012
Hi laki,

It works perfectly here.

Bob
laki 14 Feb, 2012
Im using ChronoForm 1.3/ V3.1 RC5.2 is there ant bug in it?
laki 14 Feb, 2012
I used below code,

<div class="form_item">
<div class="form_element cf_datetimepicker">
<label class="cf_label" style="width: 58px;">Check in</label>
<input type="text" value="" class="cf_datetime required" readonly name="theDate" size="20" style="color:#000;margin-right:5px" id="date_01"><input type="button" title="Please select the check in date" value="" id="" onclick="displayCalendar(document.forms[0].theDate,'yyyy/mm/dd',this)" size="20" class="calic">

</div>
<div class="cfclear"> </div>
</div>

I think some thing wrong in here. Could you please help me with this
laki 22 Feb, 2012
Hi Bob,
Any solution for this??????

If there's no solution I might go for latest Chronoform. And please tel me how to show calendar icon in Chronoforms_V4_RC3.11_J1.6 component?????
GreyHead 22 Feb, 2012
Hi laki,

Form the code you posted there you aren't using the ChronoForms datepicker so it's not surprising that the ChronoForms code doesn't work with it. You'll need to check what calendar you are using and see what the documents say.

The ChronoForms v4 calendar doesn't display an icon.

Bob
laki 23 Feb, 2012
Hi Bob,

Ya that's correct from my code its so difficult to do what I want. I have try latest ChronoForms and I hope there's no option to display the calendar icon, So how can I show the calendar icon next to the text lable. And please let me know will it display in IE??????
GreyHead 23 Feb, 2012
Hi Laki,

I'm sorry, I no longer understand what your question is.

Bob
laki 23 Feb, 2012
ok it simple how can I display the calendar icon in date picker? Will it be display in IE browser? Currently calender is not working in IE browser
GreyHead 23 Feb, 2012
Hi laki,

The ChronoForms v3 calendar displays an icon and will work in IE unless there is some other problem.

The ChronoForms v4 calendar does not display an icon.

Bob
laki 23 Feb, 2012
Hi Bob,

Another question with ChronoForms 4.0 RC3.11. Where Should I place "direction: 1"? is it "DateTime Picker config" text box????????
GreyHead 23 Feb, 2012
Hi laki,

The ChronoForms v4 calendar is different and does not use the direction option. It does have a minDate option which is similar. Please see this thread.

Bob
laki 24 Feb, 2012
Hey Bob,

Im little bit confuse with ChronoForms 4.0 RC3.11, please let me where should I put 'direction: 1'. please check the attachment, is that the correct place? if not please let me know.

thx
laki 24 Feb, 2012
sorry bob I just saw your reply. forget about the previous post.
laki 24 Feb, 2012
Thx Bob, this works perfectly.
laki 08 Mar, 2012
Hi Bob,

I have another small question, I'm using ChronoForms for a hotel reservation website and now I want to disable past dates of check out date, Ex. If check in date is 05 Sep 2012 Check out date should be future date. Users are not allow to select back date from the check in date. Hope you got my point. Please let me know how to do this???????

Thank you.

Laki
laki 09 Mar, 2012
Hi Bob,

Any solutions for above issue????????

//laki
Max_admin 11 Mar, 2012
Hi laki,

If you have V4 RC3.21 then you can check Bob's code here: http://chronoengine.com/forums.html?cont=posts&p=106431#p106431

You must enable the "Mootools datepicker" setting under the "Edit" screen though.

You may also do it using PHP code, which should work with both date pickers, I have already posted this before here, just search the forums for "minDate", you will need a "Custom datepicker" action for this.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.