jquery ui - ui Datepicker - Format the Date after selection -
i running ajax call places available date.
i can date comfortably following code :
$('.booking-date').datepicker( { beforeshowday: enableallthesedays, numberofmonths: 2, dateformat: 'dd, d mm, yy', showbuttonpanel: true, onselect: function(datetext, inst) { } }
i know dateformat there, ideally want in nice neat format end user, produces : sunday, 28 july, 2013
if can switch dateformat datetext variable mysql friendly date better.
hope can help
cheers
solved creating following :
onselect: function() { var datetext = $.datepicker.formatdate("yy-mm-dd", $(this).datepicker("getdate")); $('.date_hidden').html(datetext); }
Comments
Post a Comment