WPF Edit hours and minutes of a DateTime
Posted
by PaN1C_Showt1Me
on Stack Overflow
See other posts from Stack Overflow
or by PaN1C_Showt1Me
Published on 2010-05-21T06:27:58Z
Indexed on
2010/05/21
6:30 UTC
Read the original article
Hit count: 265
Hi !
I have 3 TextBoxes to edit a DateTime. One to edit the Date and 2 to edit hour and minutes. How would you do that? The code below doesn't reflect the DateTime changes when editing the hour or minute:
<TextBox Text="{Binding MyDateTime}" />
<TextBox Text="{Binding MyDateTime, StringFormat=\{0:HH\}}}" />
<TextBox Text="{Binding MyDateTime}, StringFormat=\{0:mm\}}" />
© Stack Overflow or respective owner