Calendar,DatePicker
1.A,返回顶部 Calendar控件(日期控件) 1,<controls:Calendar HorizontalAlignment="Left" Margin="25,12,0,0" Name="calendar1" VerticalAlignment="Top" DisplayDate="10/1/2013" DisplayMode="Month" />
2,Name,
DisplayDate[显示日期],SelectedDate[默认日期],DisplayMode[显示模式] 3,DateTime date = new DateTime(2008, 8, 8); calendar1.DisplayDate = date; //显示日期 calendar1.SelectedDate = date;//默认日期 calendar1.DisplayMode = CalendarMode.Month; //显示模式 //取值 string str = string.Format("{0:yyyy-MM-dd}", calendar1.SelectedDate);
4,
1.B,返回顶部 DatePicker控件(日期选择器) 1,<controls:DatePicker HorizontalAlignment="Left" Margin="75,53,0,0" Name="datePicker1" VerticalAlignment="Top" DisplayDate="1/8/2008" SelectedDate="1/9/2008" />
2,Name,
DisplayDate[显示日期],SelectedDate[默认日期] 3,DateTime date = new DateTime(2008, 8, 8); datePicker1.DisplayDate = date; //显示日期 datePicker1.SelectedDate = date;//默认日期 //取值 string str = string.Format("{0:yyyy-MM-dd}", datePicker1.SelectedDate);
4,
1.C,返回顶部 4, 作者:ylbtech