Hello Guys,
I'm using the little date selector widget from zapatek and it seems to be working just fine, however I'm looking to edit the function that is run when a date is selected.
That is the current function, which prints a pop-up stating that its going to jump to a URL containing the date. However I want the date to populate a text field in a form when the date is selected. The date needs to be enetered into the form field in the same format as the URL example above, like %Y/%m/%d/.
Can anyone help me with this?
Thanks guys,
Rob
I'm using the little date selector widget from zapatek and it seems to be working just fine, however I'm looking to edit the function that is run when a date is selected.
Code:
<script type="text/javascript">//<![CDATA[
function flatCalendarCallback(cal) {
if (cal.dateClicked) {
var url = "[URL unfurl="true"]http://www.mydomain.com/"[/URL] + cal.date.print("%Y/%m/%d/");
alert("Jumping to: “" + url + "” (not really).");
// uncomment the following line to actually jump:
// window.location = url;
}
};
//]]></script>
That is the current function, which prints a pop-up stating that its going to jump to a URL containing the date. However I want the date to populate a text field in a form when the date is selected. The date needs to be enetered into the form field in the same format as the URL example above, like %Y/%m/%d/.
Can anyone help me with this?
Thanks guys,
Rob