
I need to use datetime picker for entering time only not the date .
I added the datetime picker as follows:
<shared:DateTimePicker Margin="0,10,0,0" MinWidth="90" HorizontalAlignment="Left" Value="{x:Static system:DateTime.Now}" ValueConverter="{x:Null}" Height="25">
<shared:DateTimePicker.ValueConverterParameter>
<shared:DateTimeToStringPattern>ShortTime</shared:DateTimeToStringPattern>
</shared:DateTimePicker.ValueConverterParameter>
</shared:DateTimePicker>
It is showing following build error.
Unknown build error, 'Key cannot be null.Parameter name: key
But when I removed the Value="{x:Static system:DateTime.Now}", then it is not giving the error but. The dtpicker is showing dropdown to select the date. Which I don’t require I only interested in showing the Time and allowing the user to enter time in AM/PM format.
Regards
Raghuraj
I added the datetime picker as follows:
<shared:DateTimePicker Margin="0,10,0,0" MinWidth="90" HorizontalAlignment="Left" Value="{x:Static system:DateTime.Now}" ValueConverter="{x:Null}" Height="25">
<shared:DateTimePicker.ValueConverterParameter>
<shared:DateTimeToStringPattern>ShortTime</shared:DateTimeToStringPattern>
</shared:DateTimePicker.ValueConverterParameter>
</shared:DateTimePicker>
It is showing following build error.
Unknown build error, 'Key cannot be null.Parameter name: key
But when I removed the Value="{x:Static system:DateTime.Now}", then it is not giving the error but. The dtpicker is showing dropdown to select the date. Which I don’t require I only interested in showing the Time and allowing the user to enter time in AM/PM format.
Regards
Raghuraj