Radtimepicker step 15 minutes not working properly

1 Answer 92 Views
TimePicker
Justin
Top achievements
Rank 1
Justin asked on 08 Sep 2022, 04:57 PM

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? 

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Sep 2022, 09:52 AM

Hello, Justin, 

Note that the Step property is considered only when filling the Minutes part of the popup when two separate tables are used for the minutes and hours: 

            this.radTimePicker1.Step = 15;
            this.radTimePicker1.TimeTables = Telerik.WinControls.UI.TimeTables.HoursAndMinutesInTwoTables;
            this.radTimePicker1.TimePickerElement.PopupMinSize = new Size(200,300);

Otherwise, the step is 30. This is the default implementation of the TimeTables property and how it affects the popup:

        public TimeTables TimeTables
        {
            get
            {
                return this.PopupContentElement.TimeTables;
            }
            set
            {
                this.oldPopupSize = Size.Empty;
                if (value == UI.TimeTables.HoursAndMinutesInOneTable)
                {
                    this.PopupContentElement.Step = 30;
                    this.oldStep = this.step;
                    this.step = 30;
                }
                else
                {
                    this.step = this.oldStep;
                    this.PopupContentElement.Step = this.Step;
                }
                this.PopupContentElement.TimeTables = value;
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
TimePicker
Asked by
Justin
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or