i'm looking for a control, that allow select both date and time. Default DatePicker doesn't allow it. But custom controls (like Extended WPFToolkit) are expensive, anothers are not free...
At the moment I posted it I came to a solution. So I leave it here if someone needs it:
<DatePicker Name="Picker">
<DatePicker.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<TextBox Text="{Binding Path=SelectedDate, RelativeSource={RelativeSource AncestorType=DatePicker}, StringFormat={}{0:dd/MM/yyyy hh:mm:ss}}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DatePicker.Resources>
</DatePicker>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With