DoubleDate makes working with jQuery UI DatePicker and Rails a breeze. It allows you to format the date when displaying it to the user in the format of your choosing while submitting it in the format of your server's choosing. DoubleDate is written in CoffeeScript but a plain Jane JavaScript version is included as well.
- jQuery UI Datepicker (and therefore jQuery)
- Download your flavor (JS or Coffee) and include it in your app
new DoubleDate(
el: $("input.your_date_input")
)
new DoubleDate(
dateFormat: "mm/dd/yy"
altFormat: "yy-mm-dd"
)