Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何将 jquery datepicker 绑定到文本框。
但我的要求是我需要在下拉框中显示日期。
Like <dd> <mm> <yyyy>.
我已经浏览了以下链接,但是有没有更好的方法呢?
http://forum.jquery.com/topic/datepicker-need-separate-month-day-year-fields-in-my-form-instead-of-one-field-for-all-three
请在这件事上给予我帮助...
我不清楚你的问题,但理解它应该是这样的。
$( "#date_picker" ).datepicker({ dateFormat: 'dd-mm-yyyy'});
var date = $( "#date_picker" ).val();
var newDate = 新日期(日期);
var year = new Date(newDate.getFullYear());
var 月 = newDate(newDate.getMonth());
var date = newDate(newDate.getDate());