private void CalendarDatePicker_DateChanged(Windows.UI.Xaml.Controls.CalendarDatePicker sender, Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs args) { if (DataContext is DateRangeVM drvm) { drvm.RefreshData(); } }
private void weddingDate_DateChanged(Windows.UI.Xaml.Controls.CalendarDatePicker sender, Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs args) { if (args.NewDate < DateTimeOffset.Now) { return; } Vm.WeddingDate = args.NewDate; }
/// <summary> /// A calendar example /// </summary> /// <returns>CalendarDatePicker</returns> internal WUX.Controls.Control GetCalendar() { var calendar = new WUX.Controls.CalendarDatePicker { Margin = new WUX.Thickness(0, 10, 0, 0), HorizontalAlignment = WUX.HorizontalAlignment.Left, }; return(calendar); }
private void CalendarDatePicker_DateChanged( Windows.UI.Xaml.Controls.CalendarDatePicker sender, Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs args) { if (args.NewDate != args.OldDate) { if (args.NewDate != null && args.NewDate.HasValue) { SelectedDate = args.NewDate.Value; } else if (args.OldDate != null && args.OldDate.HasValue) { SelectedDate = args.OldDate.Value; Date = args.OldDate; } else { SelectedDate = DateTimeOffset.Now; } } }