зеркало из https://github.com/xamarin/mac-samples.git
[DatePicker] Cast DateTime to NSDate
This commit is contained in:
Родитель
1b5f695f1e
Коммит
237c4bcba7
|
@ -94,8 +94,8 @@ namespace DatePicker
|
|||
|
||||
datePickerControl.DatePickerElements = flags;
|
||||
|
||||
minDatePicker.DateValue = DateTime.Now;
|
||||
maxDatePicker.DateValue = NSDate.DistantFuture;
|
||||
minDatePicker.DateValue = (NSDate)DateTime.Now;
|
||||
maxDatePicker.DateValue = (NSDate)NSDate.DistantFuture;
|
||||
|
||||
secondsRangeEdit.EditingEnded += SecondsRangeEditingEnded;
|
||||
|
||||
|
@ -146,7 +146,7 @@ namespace DatePicker
|
|||
datePickerControl.BackgroundColor = backColorWell.Color;
|
||||
|
||||
// always set the date/time to TODAY
|
||||
datePickerControl.DateValue = DateTime.Now;
|
||||
datePickerControl.DateValue = (NSDate)DateTime.Now;
|
||||
|
||||
datePickerControl.NeedsDisplay = true;
|
||||
updateControls ();
|
||||
|
@ -349,7 +349,7 @@ formatter.DateStyle = NSDateFormatterStyle.Short;
|
|||
|
||||
partial void setToToday (NSButton sender)
|
||||
{
|
||||
datePickerControl.DateValue = DateTime.Now;
|
||||
datePickerControl.DateValue = (NSDate)DateTime.Now;
|
||||
}
|
||||
|
||||
partial void dateOverrideAction (NSButton sender)
|
||||
|
@ -359,7 +359,7 @@ formatter.DateStyle = NSDateFormatterStyle.Short;
|
|||
datePickerControl.DateValue = overrideDate.DateValue;
|
||||
} else {
|
||||
datePickerControl.Delegate = null;
|
||||
datePickerControl.DateValue = DateTime.Now;
|
||||
datePickerControl.DateValue = (NSDate)DateTime.Now;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче