问题
I am currently using the Xamarin Forms DatePicker
and the TimePicker
in the portable project of a portable app. But is there a combined control that lets you choose date and time at once (like DateTimePicker in Windows forms)? Please have a look at the iOS Settings > General > Date & Time (http://www.iphonefaq.org/images/archives/pangu-date.jpg).
Or is there anything I am missing on how to create such a control?
回答1:
There is not a "stock" DateTimePicker
within the controls for Xamarin.Forms
.
You could create your composite control using DatePicker
and TimePicker
within modal popups and display the Date
& Time
chosen in Label
s...
Or create your own Form control using custom renders:
Customizing Controls on Each Platform
Xamarin.Forms Widget/Control Listing
来源:https://stackoverflow.com/questions/36661863/is-there-a-datetimepicker-class-in-xamarin