Buy Now
Sign in

DateTime Box

needshelp , April 04 2011, 17:00
T
TINTIN 12
February 08 2012, 11:20 #266449
Hey Greyhead,

Thanks a lot! you have been of great help!

Thanks & Regards,
TINTIN
C
christian.gibson 18
April 04 2012, 14:08 #271122
I had two Joomla 2.5 sites in development running under WAMPserver on my laptop. The 2nd site was created to learn to use Chronoforms. The 2nd site seems to offer datepicker settings which are not available on the 1st site???
Am I using different versions of Chronoforms V4? (You can see the difference in the two form settings in the attached pictures: DatePickerConfigOn and DatePickerConfigOff).

My main problem however is that I cannot send emails via the form. I have tried all sorts of Joomla settings in the global configuration. I end up with 'Cannot instantiate mail function' (see screenshot with array). Maybe this is because I am running under WAMPserver on the laptop? To test this I tried to send a message via my online site.

I don't yet have Chronoforms on my online site (http://sebari.nl) but if I try to send a message on the online site via the Joomla contacts form I get an error: SMTP Error! Could not connect to SMTP host. (My last attempts were with mailer set to SMTP, openSSL.dll enabled in php.ini, port 465 and SMTP authentication set to yes.)
Attachments
DatePickerConfigOff.jpg
DatePickerConfigOff.jpg
(82.71 KiB)
5249 Downloads/Views
DatePickerConfigOn.jpg
DatePickerConfigOn.jpg
(86.6 KiB)
5266 Downloads/Views
Could not instantiate mail function.pdf
(135.55 KiB)
588 Downloads/Views
GreyHead 65
April 04 2012, 19:47 #271140
Hi christian.gibson,

There was an extra MooDatePicker option added in RC3.21

WAMP installations don't usually have mail servers installed by default. If the server has an internet Connection you may be able to configure your site to use a GMail server. The mailer settings are in the site Global Configuration dialogue.

Bob
If you'd like to buy me a coffee or two, thank you very much
B
brunolazzarini 4
June 15 2012, 14:37 #291010
Hi people! ;-)

I'm having some issues with DateTime Box.
I have two types of fields, one only for date and another only for time.
If I don't change anything in the DateTime Picker config, boths fields works fine, but I really need to change the date format.

This is the code that I wrote at DateTime Picker config:

format: 'd-m-Y', months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' ], days: ['Domingo', 'Segunda-Feira', 'Terça-Feira', 'Quarta-Feira', 'Quinta-Feira', 'Sexta-Feira', 'Sábado']


The problem is: if I use this code, the date fields works ok but the time Fields (with TimePicker ONLY selected) now shows only the date (even if I choose the time correctly).

So, I think this is a syntax problem, but the question is: how can I set different formats for Date and Time?

Thanks a lot!!!
GreyHead 65
June 16 2012, 12:57 #291036
Hi Bruno,

If you use the Custom DatePicker actions from the 'Power Fields' action group then you can customise the two date-pickers separately. The DateTime Picker config box configures all of the pickers in the form.

Bob
If you'd like to buy me a coffee or two, thank you very much
B
brunolazzarini 4
June 18 2012, 11:37 #291074
Hi Bob!

Thanks for your help!
I had to update my Chronoforms - which I didn't know that I had an old version - and, thanks to you, It worked!

Thanks a lot man! You're a lifesaver!
Y
yongdingg 1
June 19 2012, 06:35 #291103
Hello .
This is my mootools date picker config
format:'%Y-%m-%d %H:%M:%S', minDate: '2012-01-01 12:00:00',maxDate: new Date()

Today is 19 June .

I wish to be able to choose date before 19 June and not after .
The current time will show the current computer time .

However if i set my config to format:'%Y-%m-%d %H:%M:%S' , i can get my current time .
But i can also choose dates from after 19 june , which is not what i wanted .

any solutions ? please help .
GreyHead 65
July 01 2012, 15:23 #292244
Hi yongdingg,

I just copied you configuration string into a test form and it appears to work correctly. It shows dates from 1 Jan 2012 to 1 Jul 2012 (today).

Bob
If you'd like to buy me a coffee or two, thank you very much
A
Acemi 6
October 12 2012, 12:46 #300996
Hallo,

i can't change Output in my Form.
i use ChronoForms 4.0 RC3.4.1 on Joomla 1.5.22 and my DatePicker Type is "Default".

i put in DateFiled:
"Field Class" -> "art-postcontent::{timePicker: false, format: 'd-m-Y H:i:s', inputOutputFormat: 'd-m-Y H:i'}"

And in "DateTime Picker config" is empty.

<div class="ccms_form_element cfdiv_datetime" id="autoID-e5aede781a010bc0af22f57d36e5c6ca_container_div" style=""><label>Datum*</label><input maxlength="80" size="30" class="art-postcontent::{timePicker: false, format: 'd-m-Y H:i:s', inputOutputFormat: 'd-m-Y H:i'} validate['required'] cf_date_picker" title="" type="text" container_id="0" value="" name="input_datetime_6" />


Here is URL:
http://www.fahrdienst-ulm.de/reservierung.html

Thx. for same help.
Acemi.
GreyHead 65
October 12 2012, 17:24 #301004
Hi Acemi,

Adding the DatePicker Options in the Class box won't work.

Either use the default class and add the options to the DateTime Picker config box on the Form General tab; or

Set a custom class and use the Custom DatePicker action from the Utilities action group to configure it.

Bob
If you'd like to buy me a coffee or two, thank you very much
A
Acemi 6
October 13 2012, 09:38 #301033
Hi Bob,

thx for help. Bud, i don't understand someting!
1) i have define a costem class-name "hin_datum" and write in "Field Class".
2) And define a "Events" as "on Load -> Custom Datepicker"
3) define in this "settings -> Field Class=hin_datum", "Extra options extension=format: 'd-m-Y'"
it's don't work!

what do i wrong?

Acemi.
GreyHead 65
October 15 2012, 12:09 #301114
Hi Acemi,

That should work OK but evidently isn't. I strongly recommend that you don't use the default datepicker with Joomla! 2.5 as it has some bugs with more recent versions of the MooTools library. The MooTools datepicker is more reliable.

Bob
If you'd like to buy me a coffee or two, thank you very much
E
emmexx 456
October 28 2012, 15:52 #301825
I have a problem with duplicated datetime pickers.

I added 2 datetime pickers to a form.

In the DateTime Picker config I added some option.

I added a Custom Mootools Datepicker because I need to customise the behaviour of one of those DTP. One of them has a field class defined, the other hasn't.

What happens is that when I click on the customised field, 2 DTP appear, one over the other, one customised, the other with the general properties.

As to my understanding of the DTP object this behaviour is wrong.
The DateTime Picker config tooltip says:
this will affect all the default date fields in the form, custom ones will not be affected


What am I missing here?

Thank you
maxx
GreyHead 65
October 28 2012, 16:08 #301827
Hi Maxx,

Hmmm, there are some oddities with DatePickers but I don't recall this one.

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

Bob
If you'd like to buy me a coffee or two, thank you very much
E
emmexx 456
October 28 2012, 17:06 #301829
"GreyHead":
Please post a link to the form so I can take a quick look.

http://www.ciclobby.it/cms/index.php?option=com_chronoforms&chronoform=evento">
[url=http://www.ciclobby.it/cms/index.php?option=com_chronoforms&chronoform=evento]http://www.ciclobby.it/cms/index.php?option=com_chronoforms&chronoform=evento


Sorry, it is in italian.

Data inizio and Data fine are the customised DTPs.
If you click on the field and drag the DTP you'll find the 2nd one. The 1st has the customised properties, the 2nd the general properties.

Midway in the form there's a non customised DTP Ritrovo il... alle...

Firebug reports no javascript error.

Datetime Picker Config:
startView: 'month', format: '%d/%m/%Y %H:%M', months: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], days: ['do', 'lu', 'ma', 'me', 'gi', 've', 'sa'] , minDate: new Date()


Customised DTP:
onSelect and date format

Thank you
maxx
GreyHead 65
October 28 2012, 20:20 #301832
Hi Maxx,

Hmm . . .It's probably always been like that and I've never dragged one aside to look underneath :-(

The fix I found is to use a plain Text input element instead of a DateTime Picker element.

That effectively removes the 'default' cf_date_picker class from the input that is triggering the other datepicker.

Bob
If you'd like to buy me a coffee or two, thank you very much
E
emmexx 456
October 28 2012, 20:34 #301835
"GreyHead":

Hmm . . .It's probably always been like that and I've never dragged one aside to look underneath :-(


Impossible! Aside from dragging the DTP, after selecting a date/time from the 1st one, the 2nd one stays there.

"GreyHead":
The fix I found is to use a plain Text input element instead of a DateTime Picker element.


Thank you, I'll try that if I don't find another fix.

Do you have any idea why the DTPs are managed by class and not by id. Wouldn't it be easier to manage the javascript code creating a new instance of a DTP and assigning it to a variable instead of a generic assignment? E.g. to get some extra behaviour when a date is selected someone has to add a field class to the DTP control, add a custom datepicker action, add the OnSelect event as an option, put the code of that event in a Load JS action. :?

bye
maxx
GreyHead 65
October 28 2012, 20:48 #301836
Hi Maxx,

Wouldn't it be easier to manage the javascript code creating a new instance of a DTP and assigning it to a variable instead of a generic assignment?
Yes, I agree, I have a part built code set somewhere that does that. It got put aside when some other emergency came up.

For the current code I suspect the Max copied an example from the MonleyPhysics site, or it got carried over from an earlier version of ChronoForms which used the Joomla! calendar class if I recall correctly.

Bob
If you'd like to buy me a coffee or two, thank you very much
E
emmexx 456
November 16 2012, 10:46 #302708
(mootools datetimepicker)

I'd like to be able to select the date of a DTP based on a date selected on another DTP.
E.g.: in dtp1 I select a date, in DTP2 on opening there should be the same date and not today.

Ok, it doesn't seem that difficult until now: set the value of the element associated with DTP2.
But I don't want that. The 2nd date should be optional, so I don't want to set a value after selecting DTP1.

I tried to use the onOpen event and the select method of the DTP but there's something not working.

Any suggestion to accomplish that?

Thank you
maxx
GreyHead 65
November 19 2012, 12:13 #302856
Hi Maxx,

I've got this working with a chunk of custom code (needed because of some quirks in the way ChronoForms handles the datepickers). You can see it here

The form uses two standard Text box elements (not datepicker elements). They have ids 'start_date' and 'end_date'.

In the On Load event I have two extra actions, a Custom Code action and a Load JS action.

The Custom Code action has this code to load the required datepicker files (normally this is done by ChronoForms):
<?php
$document =& JFactory::getDocument();
// make sure that MooTools is loaded
JHTML::_( 'behavior.mootools' );
$cf_url = JURI::root().'components/com_chronoforms/js/datepicker_moo/';

// you can change the uncommented line here to change the style
$datepicker_style = $form->form_params->get( 'datepicker_moo_style', 'datepicker_dashboard' );
$document->addStyleSheet( $cf_url.$datepicker_style.'/'.$datepicker_style.'.css' );
// set the datepicker language
$lang =& JFactory::getLanguage();
$tag = $lang->getTag();
if ( !$tag ) {
$tag = $lang->getDefault();
}
$use_tag = 'en-US';
if ( file_exists( $cf_url.'Locale.'.$tag.'.DatePicker.js' ) ) {
$use_tag = $this->tag;
}
// load the datpicker script files
$document->addScript( $cf_url.'Locale.'.$use_tag.'.DatePicker.js' );
$document->addScript( $cf_url.'Picker.js' );
$document->addScript( $cf_url.'Picker.Attach.js' );
$document->addScript( $cf_url.'Picker.Date.js' );
?>

And the Load JS action has this code:
window.addEvent('load', function() {
var start_date, end_date;
// set up the start datepicker
start_date = new Picker.Date($('start_date'), {
pickerClass: 'datepicker_dashboard',
format: '%Y-%m-%d',
allowEmpty: true,
useFadeInOut: !Browser.ie
});
// set up the end datepicker
end_date = new Picker.Date($('end_date'), {
pickerClass: 'datepicker_dashboard',
format: '%Y-%m-%d',
allowEmpty: true,
useFadeInOut: !Browser.ie
});
// add a check when the end datepicker is opened
end_date.addEvent('open', function() {
if ( start_date.date != end_date.date ) {
end_date.options.minDate = start_date.date;
}
});
});

The setup options here are the default ones used by ChronoForms, you can change them or add others as needed.

Bob

PS To set the end_date to be different from the start_date you can replace
end_date.options.minDate = start_date.date;
with, for example
end_date.options.minDate = start_date.date.increment('day', 4);
If you'd like to buy me a coffee or two, thank you very much