Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Set minimum date and time spinner steps

$
0
0
Hi,

I believe you are talking about the Control DateTimePicker.

You can try this :
<xctk:DateTimePicker  Value="{Binding ., Source={x:Static sys:DateTime.Now}}"
                           Minimum="{Binding ., Source={x:Static sys:DateTime.Now}}"
                           DefaultValue="{Binding ., Source={x:Static sys:DateTime.Now}}"/>
This will set the current date+time as the minimum "selectable" date in the calendar and Automatically show the current date as default.
For the Time spinner to increase in steps of 5 minutes instead of 1 minute,
-starting at v2.9, you have access to DateTimePicker.Step property which increment/decrement the selected Date part by this Step value.
-starting a v3.1 the TimePicker.Step property is binded to the DateTimePicker.Step property. But again, this TimePicker.Step property will increment/decrement the selected time part by this Step value. So setting it to 5, will increment/decrement hours by 5 and minutes by 5.
Issue https://wpftoolkit.codeplex.com/workitem/22219 has been created to set a Step per Time part.

Viewing all articles
Browse latest Browse all 4964


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>