javascript - Show current day in the title of jquery datepicker -
how can show current full date in title of jquery datepicker :
05 july 2015
because show me july 2015
i couldn't find non-hacky way of doing it, changing defaults config text want show might you:
var defaults = { monthnames: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december' ] }; var today = new date(); var month = today.getmonth(); defaults.monthnames[month] = today.getdate() + ' ' + defaults.monthnames[month]; $.datepicker.setdefaults(defaults);
here working plnkr: http://plnkr.co/edit/gfp95vochd4fhqoktil3?p=preview
Comments
Post a Comment