This question already exists:
First day of the week JDatePicker 1.3.4
                        
                                2个月前关闭。
            
                    
这是我的代码

JFrame frame=new JFrame();
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setSize(300,300);
UtilDateModel model=new UtilDateModel();
Properties p=new Properties();
p.put("text.today","Today");
p.put("text.month","Month");
p.put("text.year","Year");
JDatePanelImpl datePanel=new JDatePanelImpl(model,p);
JDatePickerImpl datePicker=new JDatePickerImpl(datePanel,new
DateLabelFormatter());


如何设置星期一的第一天,我在版本1.3.4中理解的datePicker method.setFirstDayMonday()不起作用。

最佳答案

使用指定的firstDay选项初始化datepicker:


$( ".selector" ).datepicker({
  firstDay: 1
});


初始化后获取或设置firstDay选项:

// Getter
var firstDay = $( ".selector" ).datepicker( "option", "firstDay" );

// Setter
$( ".selector" ).datepicker( "option", "firstDay", 1 );

09-10 20:28