How get current month short name with jquery ui datepicker instead full month name?
Posted
by
Yosef
on Stack Overflow
See other posts from Stack Overflow
or by Yosef
Published on 2012-03-25T16:21:33Z
Indexed on
2012/03/25
23:30 UTC
Read the original article
Hit count: 268
jquery-ui
|datepicker
My code that give long month name instead short name:
var monthShortName=$.datepicker.formatDate('MM d, yy', new Date(),{ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });
alert(monthShortNam); // "March" and not like i want "Mar"
Thanks
(I use JQuery 1.7.1 + jQuery UI 1.8.2)
Edit - Eliasson Solution('M' and not 'MM'):
$.datepicker.formatDate('M d, yy', new Date());
© Stack Overflow or respective owner