hi there,
I have one datetime box (date) that is required and a second datetime box (date_end) that is not.
both fields are set up as date
when checking a db entry with only date entered date_end is set to 0000-00-00 as expected
however when following an edit link on the form date_end would hold the value 2011-01-01
what am I overlooking ? when editing an entry in a form I would like the non-required date field to be either blank or display 0000-00-00.
and a second question:
is there a way to require that date_end is at least 1 day after date ?
J!1.5.23, CF 4 RC1.9
I have one datetime box (date) that is required and a second datetime box (date_end) that is not.
both fields are set up as date
when checking a db entry with only date entered date_end is set to 0000-00-00 as expected
however when following an edit link on the form date_end would hold the value 2011-01-01
what am I overlooking ? when editing an entry in a form I would like the non-required date field to be either blank or display 0000-00-00.
and a second question:
is there a way to require that date_end is at least 1 day after date ?
J!1.5.23, CF 4 RC1.9
Hi Chrissy,
I will test this and get back to you.
Regards,
Max
I will test this and get back to you.
Regards,
Max
Hi Chrissy,
I think you need to use the allowEmpty: Yes option for the datetime picker. If this is not set and the date field is empty then the datepicker inserts today's date.
Bob
I think you need to use the allowEmpty: Yes option for the datetime picker. If this is not set and the date field is empty then the datepicker inserts today's date.
Bob
hi Bob! welcome back!🙂
provided you mean adding the snippet in General tab - DateTime Picker config then yes that is working and I now get a 0000-00-00 when editing an entry
thanks for the hint!😀
provided you mean adding the snippet in General tab - DateTime Picker config then yes that is working and I now get a 0000-00-00 when editing an entry
thanks for the hint!😀
I do have another question though:
is there a way to require that date_end is at least 1 day after date, i.e. can I enter a min date for date_end somewhere?
is there a way to require that date_end is at least 1 day after date, i.e. can I enter a min date for date_end somewhere?
Hi chrissy,
you need:
in a Custom Datepicker action with a custom class for your date picker element.
Regards,
Max
you need:
minDate: { date: '10-03-2009', format: 'd-m-Y' }
in a Custom Datepicker action with a custom class for your date picker element.
Regards,
Max
This topic is locked and no more replies can be posted.