DMXzone Calendar 2 Support Product Page
12/31/1969 when posting to second form
Asked 06 May 2014 23:51:27
1
has this question
06 May 2014 23:51:27 Ghassan Safadi posted:
I tried and tried but have not been able to get clicked Calendar date to update a second php file:Calendar php file:
</head>
<body>
<div class="dmxCalendar2" id="dmxCalendar21"></div>
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(
function()
{
jQuery("#dmxCalendar21".dmxCalendar2(
{"altField": "hidden_dmxCalendar21", "displayInline": true, "condDates": [], "firstDay": 1, "showOn": "both", "duration": "slow", "showOptions": {"direction": "up", "easing": "swing"}, "yearRange": "c-10:c+10", "onSelect": "dmxCalendar2Action(\'copyFrom\',\'dmxCalendar21\', \'hidden_dmxCalendar21\', \'selectedDate\', \'mm/dd/yy\');MM_openBrWindow(\'testdate.php\',\'\',\'\');"}
);
}
);
// ]]>
</script>
</body>
<form Action="testdate.php" method="POST">
<input type="date" id="hidden_dmxCalendar21" name="hidden_dmxCalendar21" value="" />
</form>
</html>
and the second file (testdate.php) in same directory:
<body>
<form method="POST">
<input type="date" name="mydate"
value="<?php echo date("m/d/Y", $_Post["FORM.hidden_dmxCalendar21"]);
?>">
</form>
</body>
results in the second file opening up when date clicked but only shows 12/31/169
Thanks for the help
Replies
Replied 08 May 2014 11:29:49
08 May 2014 11:29:49 Ghassan Safadi replied:
I can get the date to update if is a text input under behaviors but not if it is a hidden field