<script type="text/javascript">
document.getElementById("trigger_filters_created_at_from").disabled = false;
Calendar.setup({
inputField : "year_month",
ifFormat : "%m %Y", //displays date as 02 2014, But i want it as 'February 2014'
daFormat : "%m %Y", //MM yy
button : "trigger_filters_created_at_from",
showsTime : true
});
</script>
嗨,正如我在评论中提到的那样,我希望将价值显示为“2014年2月”或“2014年2月”,你们能否给我正确的表达来实现这一目标。
答案 0 :(得分:0)
<script type="text/javascript">
document.getElementById("trigger_filters_created_at_from").disabled = false;
Calendar.setup({
inputField : "year_month",
ifFormat : "%B %Y", //displays date as 02 2014, But i want it as 'February 2014'
daFormat : "%m %Y", //MM yy
button : "trigger_filters_created_at_from",
showsTime : true
});
</script>
使用%B而不是%m