Using Date Picker Joomla 1.5

GreyHead 27 Aug, 2013
Hi Kees,

It will work with the MooTools Datepicker - and you should be using that with CFv4. I don't know what the 'custom datepicker' is.

Bob
keske 27 Aug, 2013
Hi Bob,

Thanks for your fast reply. I installed 4.0 (latest verstion)for 1.5. By Actions -> Utilities I find "custom datepicker". Is this the Mootools one? I also work with the version for Joomla 3 and find under "Powerfields" custom Datepicker and Custom Mootools Datepicker aswell. So that's why I don't know. I need to arrange an extra two days in front for the dat field (excuse my English).

Thnx
Gr.
Kees
GreyHead 27 Aug, 2013
Hi Kees,

Ah OK. You want the Custom MooTools DatePicker to work with the MooTools DatePicker (the other one works with the old MonkeyPhysics DatePicker).

Bob
keske 27 Aug, 2013
Hi Bob,

Ok, I didn't know that there was this difference. What I want to do is this line:
minDate: new Date().increment('day', 2)
for a form in chronoforms 4 for joomla 1.5. This client still uses this version and wants to arrange two extra days in his form to by-pass the weekend. I saw that there wasn't a Mootools datepaicker in this version for Joomla 1.5, Am I right?

Can I use this line of code so it will work?

Thanks
GreyHead 27 Aug, 2013
Hi Kees,

I saw that there wasn't a Mootools datepaicker in this version for Joomla 1.5

If you are using ChronoForms v4 then there should be.

I would expect the code to work - please try it and see.

Bob
keske 27 Aug, 2013
Hi Bob,

I upgraded the component, is that why it could be possible that I don't see this Mootools picker?

I'm gonna try.

Thnx
keske 28 Aug, 2013
Hi Bob,

Thanks for the link.
I can't get it to work. The datepicker works but the increment of two days doesn't. When I add this line of code
minDate: new Date().increment('day', 2)
in "datepicker extra options extension" the datepicker doesn't work.

Do you have other suggestions?

Thank you.

Greetings Kees
GreyHead 28 Aug, 2013
Hi Kees,

The only suggestion I have is that you try a comma , at the end of the line. After that check your Browser JavaScript console to see what is happening.

Bob
keske 28 Aug, 2013
Hi Bob,

Thanks. It didn't work out.

I did add a comma and checking the javascipt console and see this:
[12:47:38.225] TypeError: (intermediate value).increment is not a function @ http://www.dedriedeuren.nl/index.php?option=com_chronoforms&tmpl=component&chronoform=test:46

And this is loading:


//<![CDATA[
					//]]>
		
//<![CDATA[
			window.addEvent('load', function() {
				new DatePicker('.datepicker', {pickerClass: 'datepicker_dashboard', format: 'l, d-m-Y', inputOutputFormat: 'l, d-m-Y', allowEmpty: 0, timePicker: 0, timePickerOnly: 0, months: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december' ], days: ['Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag'], minDate: new Date().increment('day', 2),});
			});
		
//]]>
//<![CDATA[
			window.addEvent('domready', function() {
				document.id('chronoform_test').addClass('hasValidation');
				formCheck_test = new FormCheckMax('chronoform_test', {
					onValidateSuccess: $empty,
					display : {
						showErrors : 1,
						errorsLocation: 1					}
				});										
			});
			
//]]>
//<![CDATA[
			window.addEvent('load', function() {
								new DatePicker('.cf_date_picker', {pickerClass: 'datepicker_dashboard', format: 'Y-m-d', inputOutputFormat: 'Y-m-d', allowEmpty: true, minDate: new Date().increment('day', 2)});
								new DatePicker('.cf_datetime_picker', {pickerClass: 'datepicker_dashboard', inputOutputFormat: 'Y-m-d H:i:s', timePicker: true, allowEmpty: true, format: 'd-m-Y H:i:s', minDate: new Date().increment('day', 2)});
								new DatePicker('.cf_time_picker', {pickerClass: 'datepicker_dashboard', inputOutputFormat: 'H:i:s', timePickerOnly: true, allowEmpty: true, format: 'H:i:s', minDate: new Date().increment('day', 2)});
							});
		
//]]>

Because I don't know much about javascript, it's there a few times. And it says TypeError in the console but I don't know what the error is. Can you see what is going on?

Thank you,
Greetings Kees
GreyHead 29 Aug, 2013
Hi Kees,

it looks as though you are still using the old Monkey Physics datepicker and I don't think that supports the Date object. You'll need to switch to the MooTools datepicker.

Bob
keske 02 Sep, 2013
Hi Bob,

Thanks.

I can not choose an other datepicker then the "custom datepicker" from Actions and "Datepicker" for the Elements. So I don't know how to choose the Mootools one. I don't find it it the component

Could it be possible that someting went wrong with updating the component? The attachment shows the version of the component.

Thank You

Kees
GreyHead 02 Sep, 2013
Hi Kees,

There a setting to choose the DatePicker on the form General tab (click the name link in the Forms Manager to see the tab).

Bob
keske 03 Sep, 2013
Hi Bob,

Thank you,

This is on Mootools now. I have the same configuration on a Joomla 3 website and there it works, but on the Joomla 1.5 it doesn't. The only difference between the two configurations is that on the Joomla 1.5 version I only can choose a Custom Datepicker on the EVENTS. In the Joomla 3 version I can choose there also for a custom Mootools datepicker wbhich I use there. Could that be the reason it doesn't work?

Thank you for your support.

Gr. Kees
GreyHead 03 Sep, 2013
HI Kees,

It might be. I think that the latest version of ChronoForms v4 for Joomla! 1.5 includes the Custom MooTools Datepicker action as well - though some earlier versions didn't.

It is possible to work without the Custom MooTools Datepicker action but requires more JavaScript instead.

Bob
keske 03 Sep, 2013
Hi Bob,

Thnx,

I think something is going wrong.
Is it necessary to get the date picker to work (with the increment-function in my earlier messages) with the Mootools date picker in the general tab and the custom mootools Datepicker in the EVENTS tab (Joomla 1.5)? Because if that is true, then there is something strange going, I don't have the option of chosing the custom mootools date picker because it is not there. Ther e is only a Custom datepicker wich is not hte Mootools one. In my other test version (joomla 3) it is there and it works.

I get confused because I don't know exactly what to do now?

Can you give a hint?

Thank you very much.
GreyHead 03 Sep, 2013
Hi Kees

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
keske 04 Sep, 2013
Hi Bob,

Thnx,

I use version 4.0, see attachment.

Gr, Kees
GreyHead 04 Sep, 2013
Hi Kees,

Then you should have the MooTools Datepicker option on the form General tab*? :-) I have just checked and the files are included in that version.

Bob

* Click the form Name link in the Forms Manager to see it.
keske 04 Sep, 2013
Hi Bob,

Thnx.

Yes, it is there but I can't add a mootools picker in the events tab. This mootools picker (in the events tab) is in de Joomla 3 version but not in the Joomla 1.5 version

gr. Kees
keske 05 Sep, 2013
Hi Bob,

Just to be clear: Am I right that I need also a mootools picker in the Eventtab besides the Mootools Datepicker in de Genral Tab? Because that's the difference between the JM 1.5 and the JM 3 version. In the 3-version I see a Mootools picker in the Event Tab and that works with the increment-function. In de 1.5 -version I see a custom Date picker and it doesn't work with the increment-function.

I hope I am clear enough, otherwise please let me know.

Thank you veru much.

Gr. Kees
GreyHead 05 Sep, 2013
Hi Kees,

You don't *need* the MooTools Custom DatePicker action - it just makes it simpler to add some of the DatePicker options. You can still add options directly into the Options box on the form General tab.

I'm sorry, I hadn't noticed that Max hasn't included the action with the latest Joomla! 1.5 release - that may just have been an over-sight :-(

Bob
keske 06 Sep, 2013
Hi Bob,

Thank you,

Without the Custom Datepicker in the Event tap, the datepicker won't work. And with the Custom Datepicker in the Event Tab, the increment function doesn't work. So there is no way to make the increment function working in the 1.5 version. Is this conclusion right? Is ther an older version with the mootools datepicker for the Event Tab which I can use? I really would like to help this client.

Thanx

Gr. Kees
GreyHead 06 Sep, 2013
Hi Kees,

Please try turning on MooTools More in the MooTools Upgrade plug-in. It looks as if that isn't loading and I think that in MooTools 1.2.5 the Date functions like increment are in More and not in Core.

Bob
keske 10 Sep, 2013
Hi Bob,

The plugin was "on" but I could find the option Mootools More in the plugin.

Thnx

Kees
keske 11 Sep, 2013
Hi Bob,

Sorry, I was not clear: I mean I counldn't find this option. Is it possible that the plugin is not working well?

Thank you.

Gr. Kees
This topic is locked and no more replies can be posted.