Hi,
using this code as Field Default Value
in a text field I get the correct date: 19-11-2012.
If I use the same code in datepicker, this code does not work and displays: 01-01-2012.
Looking at the html source code value is correct to 19-11-2012.
Any idea?
using this code as Field Default Value
<?php echo date('d-m-Y'); ?>
in a text field I get the correct date: 19-11-2012.
If I use the same code in datepicker, this code does not work and displays: 01-01-2012.
Looking at the html source code value is correct to 19-11-2012.
Any idea?
Hi jack19,
If you add a Custom Code action to the On Load event of your form and put this code in it then it seems to work OK:
I tested this here. You may need to change the input name and the format string to suit your form.
Bob
If you add a Custom Code action to the On Load event of your form and put this code in it then it seems to work OK:
<?php
$form->data['start_date'] = date('Y-m-d');
?>
I tested this here. You may need to change the input name and the format string to suit your form.
Bob
Hi GreyHead,
tank you for reply, but don't work.
I'm using Joomla 1.5.26 and CFV4 3.5.1
Regards.
tank you for reply, but don't work.
I'm using Joomla 1.5.26 and CFV4 3.5.1
Regards.
Hi jack19,
Did you get this to work? If not please post the code and actions you have used.
Bob
Did you get this to work? If not please post the code and actions you have used.
Bob
Hello, I too have tried and does not work. The datapicker remains ... 01/01/2013 How can I do? This is the custom code I used:
<?php
$tempo=time();
$giorno=date('d m Y',$tempo);
echo $giorno;
$form->data['datacircolare'] = $giorno;
?>
Inside On Load I have uploaded the following actions:
Custom Datapicker
Custom Code
show HTML
HELP ME PLEASE.....!
<?php
$tempo=time();
$giorno=date('d m Y',$tempo);
echo $giorno;
$form->data['datacircolare'] = $giorno;
?>
Inside On Load I have uploaded the following actions:
Custom Datapicker
Custom Code
show HTML
HELP ME PLEASE.....!
This topic is locked and no more replies can be posted.