I have the following script with a UI Datepicker, but I need the date as a param in my URL.. I just can't seem to get the date formatted correctly in the URL.. The input box with the date are just fine but the date don't show up in my URL string..
I need the dateText variable to be formatted as "yyyy-mm-dd"
<script type="text/javascript">
jQuery(function() {
jQuery('#datepick').datepicker({ dateFormat: "yy-mm-dd" })({
onSelect: function (dateText, inst) {
window.location.href="reports?date=" + dateText;
}
})
});
</script>
Thank you..