views:

14

answers:

1

I can't figure out how to change the format for this and there is nothing really in the sparse documentation, which I find bizarre since it is surely one of the most important things when dealing with date inputs.

I have:

<script type="text/javascript">
jQuery(document).ready(function() {
  jQuery("#event_start").simpleDatepicker();
});
</script>

http://teddevito.com/demos/calendar.php

I don't know what he means by:

allows you to easily change the output format (look for "jQuery.fn.simpleDatepicker.formatOutput = function (dateObj) {...")

If anyone can point out what I'm not seeing I would be massively grateful, i really need to change this format!

A: 

He is referring to this code which is in cal.js:
jQuery.fn.simpleDatepicker.formatOutput = function (dateObj) {
return (dateObj.getMonth() + 1) + "/" + dateObj.getDate() + "/" + dateObj.getFullYear();};

That's the code you need to change.

Amati
Ah I see, I can just change those around then. Thanks
Michael Mallett
Sorry, I have tried changing those around and it won't output a value.
Michael Mallett
Nope, it was me being stupid. Thanks again.
Michael Mallett