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.
可以只显示天数吗?(我不需要完整的日期)。
我尝试:$('.date').datepicker({dateFormat: 'dd'}); 但我仍然看到显示的完整日期(例如 16-6-13 而不是 16)
$('.date').datepicker({dateFormat: 'dd'});
有办法改变吗?也许是一种已知的黑客...
将格式更改为 dd-mm-yy 并在相关文本框中尝试以下操作。
$('#textBoXID').change(function(){ var actualText=$(this).val(); var arrayOfDate=[]; arrayOfDate=actualText.split('-'); $('#textBoXID').val(arrayOfDate[0]); });