Reputation: 23
I'm new to WPF, i want to implement UI to select both date and time from the user at a time, How can achieve this?
I tried with below code -
<DatePicker SelectedDate="{Binding Date, StringFormat='dd/MM/yyyy HH:mm:ss'}"/>
Not able to achieve, kindly requesting you to help me out?
Thanks,
Upvotes: 2
Views: 6991
Reputation: 182
Use the extended DateTimePicker . The DatePicker
control does not deal with time, only dates. So you will need to use a different control.
Install Extended WPF Toolkit via NuGet
packages in your project. and the use it like default DatePicker. But this has some extra properties, mentioned here DateTimePicker. use them according to your requirement.
Upvotes: 3