Example #1
0
 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;
         }
     }
 }
Example #2
0
        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;
        }
 private void CalendarDatePicker_DateChanged(Windows.UI.Xaml.Controls.CalendarDatePicker sender, Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs args)
 {
     if (DataContext is DateRangeVM drvm)
     {
         drvm.RefreshData();
     }
 }