我对javascript和jquery很新.我一直在寻找解决方案,但我无处可去.我正在使用http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/中的daterangepicker .
这是评论中建议的解决方案:
$("input").daterangepicker({
dateFormat:"MM dd yyyy”,
datepickerOptions: $j.extend({},
$j.datepicker.regional[’de’], { //germany
showStatus: true, //this is just a datepicker option
showOn: “both”,//this is just a datepicker option
changeYear :true//this is just a datepicker option
})
});
Run Code Online (Sandbox Code Playgroud)
我尝试了上面的方法,但无处可去.我非常喜欢javascript,所以请耐心等待.
parent.$('#start_date_<?php echo $widget_id;?>').daterangepicker({
monthOnly: true,
arrows:false,
dateFormat: 'MM yy',
latestDate: '<?php echo date('Y-m-d');?>',
presetRanges: [
{text:'<?php echo lang('dashboards_month_to_date');?>', dateStart: 'm2d', dateEnd: 'today' },
{text: '<?php echo lang('dashboards_quarter_to_date');?>', dateStart: 'q2d', dateEnd: 'today' },
{text: '<?php echo lang('dashboards_year_to_date');?>', dateStart: 'y2d', dateEnd: 'today' } …Run Code Online (Sandbox Code Playgroud)