In the datePicker selected 20.04.2012
. I want to get this value, format it and store in a variable.
I uses this code:
var date = $("#scheduleDate").datepicker({ dateFormat: 'dd,MM,yyyy' }).val();
But result is 20.04.2012
.
Also, I tryed this code:
var dateTypeVar = $('#scheduleDate').datepicker('getDate');
$.datepicker.formatDate('dd-MM-yy', dateTypeVar);
Result is Fri Apr 20 2012 00:00:00 GMT+0600
.
I want to get the following: 20, April, 2012
How to format properly?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…