Hi,
is there any way to make datepicker editable manually?
If you need to fill the birth date is quite complicated, because you have to scroll back till birth year...
Thank you!
is there any way to make datepicker editable manually?
If you need to fill the birth date is quite complicated, because you have to scroll back till birth year...
Thank you!
Hi enzo.orsi,
Not easily and allowing manual entry gives you messy validation problems. For a birth date you should set the datepicker to start in Year view then you can click back 20 years at a time.
Bob
Not easily and allowing manual entry gives you messy validation problems. For a birth date you should set the datepicker to start in Year view then you can click back 20 years at a time.
Bob
Thank you Bob, I already changed to start in Year.
Is there any way also to start for example in 1970?
Is there any way also to start for example in 1970?
Hi enzo.orsi,
Hmmm . . . I was able to do it by setting a default date for the picker using code like this in a Custom Code action before the HTML (Render Form) action in the form On Load event.
The if() part is there so that any existing date is not over-written.
Bob
Hmmm . . . I was able to do it by setting a default date for the picker using code like this in a Custom Code action before the HTML (Render Form) action in the form On Load event.
<?php
if ( empty($form->data['datepicker1']) ) {
$form->data['datepicker1'] = '01-01-1970';
}
?>
Change datepicker1 to the name of your datepicker.
The if() part is there so that any existing date is not over-written.
Bob
This topic is locked and no more replies can be posted.