So I want the user to choose a time with an interval of 15 mins, I disabled key presses because their is no proper way to handle it to round up to the nearest 15 mins.
Anyways my issue is that I tried using this setup so that the user can easily pick 15 mins interval
this.ReturnTimePicker.Step = 15; this.ReturnTimePicker.TimeTables = Telerik.WinControls.UI.TimeTables.HoursAndMinutesInOneTable;
The result looks like this
So ok, probably a bug or 15 mins is not supported because of how many the choices would be.
So now I decided just to use the 2 tables instead of 1.
this.ReturnTimePicker.Step = 15; this.ReturnTimePicker.TimeTables = Telerik.WinControls.UI.TimeTables.HoursAndMinutesInTwoTables;
The result is
It technically works and it's great but as you can see the Minutes is hidden, I need to drag the popup so it opens up properly.
I don't want my users to do that every time, so I want the control to be already expanded fully
Any fixes or alternatives on this issues?
private void radDateTimePicker_RootElement_MouseWheel(object sender, MouseEventArgs e)
{
if(e.Delta>0)
{
radDateTimePicker.Value.AddMonths(1);
}
}
I wanted to show a clear button to either clear the value or text of the control.
The idea is the same as the clear button in
dateTimePicker.DateTimePickerElement.Calendar.ClearButton
But I don't see any ClearButton from its child elements.
I came up with the idea to rename the Close Button in
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement
and to add a clear action on its Click Event.
I came up with this code:
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Text = "Clear";
(radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).TextElement.Text = "Clear";
(radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.Children[0] as RadButtonElement).ToolTipText = "Clear";
radTimePicker.TimePickerElement.PopupContentElement.FooterPanel.ButtonElement.Click +=
delegate(object sender, EventArgs e) { radTimePicker.Value = null; };
The tooltiptext works as well as the clearing of value. with this, I know that I am using the right button element.
But the Text always revert/return to "Close".
Am I forgetting something?
dtpShutDown.NullDate = Convert.ToDateTime(
"01/01/0001"
);
dtpShutDown.NullText =
""
;
dtpShutDown.Value = Convert.ToDateTime(
"01/01/0001"
);
tpLogin.NullText =
""
;
tpLogin.Value = Convert.ToDateTime(
"01/01/0001 00:00:00"
);