Hi
i have 2 calendar controls for start and end date
i want, through a button, populate both with dates
eg last year
start_date 01/01/0222
end_date 31/12/2022
with this code i populate box but when i send form, value don't go in {data:}
code for my custom button is in a CUSTOM HTML VIEW
<div id="interoAnnoScorsoButton" onclick="interoAnnoScorso()" class="ui button tiny blue ">anno scorso</div>
fields seems correctly populated but no data when i send form and if i watch firebug i have value="" in calendar control
is right .value assignment for calendar ui control?
i have 2 calendar controls for start and end date
i want, through a button, populate both with dates
eg last year
start_date 01/01/0222
end_date 31/12/2022
with this code i populate box but when i send form, value don't go in {data:}
code for my custom button is in a CUSTOM HTML VIEW
<div id="interoAnnoScorsoButton" onclick="interoAnnoScorso()" class="ui button tiny blue ">anno scorso</div>
<?php
$dadata=date(date('Y', strtotime('-1 year'))."-01-01 00:00:00");
$adata=date(date('Y', strtotime('-1 year'))."-12-31 00:00:00");
?>
<script>
function interoAnnoScorso(){
document.getElementById("dadata").value="<?php echo $dadata; ?>";
document.getElementById("adata").value="<?php echo $adata; ?>";
}
</script>
fields seems correctly populated but no data when i send form and if i watch firebug i have value="" in calendar control
is right .value assignment for calendar ui control?