SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
572 stars 347 forks source link

Time picker annoyance #2754

Closed mikejed closed 12 months ago

mikejed commented 6 years ago

Prerequisites

Description

When changing the time listed in a time picker control, changing the number of digits in the hour segment causes the minute segment to be very difficult to edit

Steps to Reproduce

  1. Browse to a time picker control with no existing value. A new Content Channel Item or a blank Person Attributes are an easy example.
  2. Note the current time should be provided in the control. Click on the time picker, and note that the hour portion of the field highlights.
  3. If the currently listed hour is between 1-9, change it to a higher value such as 12. If the currently listed hour is 10-12, change it to a lower number such as 6
  4. Click the control again to edit the minutes.

Expected behavior:

The beginning offset of the minute portion of the string should be recalculated based on the new length of the hour string, so the two-digit minutes are highlighted

Actual behavior:

The beginning offset of the minute portion of the string from before you changed the hour value is maintaned. So either the second number of the minute and the following space character are highlighted, or the colon and the first number of the minute are (depending on whether you added length to the time string or reduced it). Attempting to change the minutes are very unwieldy, until you blur focus from that control by clicking off of it, and then re-focusing on the control. (Selecting the minutes portion takes two clicks again after the blur, but this time will highlight the correct characters since you haven't changed the length).

Having changed the existing hour value of 12 to a new value of 6 then trying to select the minute:

![https://user-images.githubusercontent.com/6932047/36003267-709f85b6-0cea-11e8-8915-50e6515645cb.png image]()

Having changed the existing hour value of 6 to a new value of 12 then trying to select the minute:

![https://user-images.githubusercontent.com/6932047/36003305-9e1cb69e-0cea-11e8-93ad-1bb53430b11f.png image]()

Additionally, using the arrow keys (up and down) to edit the minutes value while the incorrect characters are selected (in either of the configurations shown above) causes the hour string to reset to the original value.

Versions

jonedmiston commented 12 months ago

@mikejed can you confirm this is still an issue. I'm not able to reproduce. It's possible we have updated the JS control since you opened this.

mikejed commented 12 months ago

Confirmed still an issue in v15.1 (today's public demo environment). Here's a video. Between 6 and 8 seconds I'm clicking on either side of the colon and it's highlighting the full hour or minute values as expected. But if I change the 2 to 10 and then click on either side of the colon, the wrong characters are highlighted (shown between 10 and 15 seconds).

Workflow-Entry-Rock-RMS (1).webm

jonedmiston commented 12 months ago

Talked to Michael and we agreed this was more of an occasional annoyance than an issue. Checked to make sure the jquery component is the latest (it is) so closing.