Forums

datepicker wrong date

?
Guest 05 Sep, 2011
hi all,

on my form I have 2 datepickers: date_from and date_to
only date_from is required

if I now go into edit mode while date_from displays the appropriate value date_to displays '2011-01-01' instead of '0000-00-00' or blank

what am I doing wrong?
GreyHead 06 Sep, 2011
Hi GabrielaH,

Sorry I can’t tell anything from your description. DatePickers are sensitive, you have to make sure all the settings and the classes used to configure them are exactly correct.

Bob
?
Guest 06 Sep, 2011
well...

datetime box 1
Field Name:date_from
Field Class: date_picker_1
required: both are checked

datetime box 2
Field Name:date_to
Field Class: date_picker_2
required: neither is checked

custom datepicker action after Show html / before load js
Field Class:date_picker_2
Date format shown/posted:Y-m-d
Allow Empty:yes
Load Time picker/Time picker Only:no

I can submit new items alright
when editing items for date_to I can shortly see the default value before it is being swapped for '2011-01-01' but when saving without any changes to date_to the field would still have value '0000-00-00' in the table
?
Guest 10 Oct, 2011
Hi Max,

I switched the order of the custom datepicker and the show HTML but to no avail.
date_to, when left empty upon creating the entry, would still be displayes as '2011-01-01' in edit mode.

any idea what else to try ? I really need an empty date field to be displayed as empty (blank or 0000-00-00)
GreyHead 10 Oct, 2011
Hi,

I have written a post here which gets ChronoForms to work with a later version of the DatePicker that does not have the same problems with MooTools 1.3.

I haven't tried all the bells and whistles yet but minDate and maxDate are working with fixed dates and I think that they can be used fairly easily with variable dates.

If you try it please do not use on a live site without testing and let me know about any problems you find.

I can't speak for Max but hopefully this or something very similar will find it's way into a forthcoming update of ChronoForms for Joomla! 1.6/1.7

Bob
?
Guest 12 Oct, 2011
Hi Bob,

my problem here is not mindate / maxdate but if a date field is being left empty upon adding an event, once in edit mode the empty field would be displayed as '2011-01-01'.
This topic is locked and no more replies can be posted.