danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
141 stars 61 forks source link

How to disable validation while inputing time and minute #60

Closed Blair2004 closed 4 years ago

Blair2004 commented 4 years ago

Hi, I'm currently using the version 9.4.2, and the issue I'm facing is that when we're retrying to input an hour and minutes over the time fields, someone there is a validation running making it impossible to set time like 12, 15, as for the first number entered, it's immediately led by a 0.

Peek 2020-07-04 18-48

This is really annoying as we don't necessarily need to use the arrows

Blair2004 commented 4 years ago

I don't know who created that feature, but it's so annoying.

danielmoncada commented 4 years ago

@Blair2004 yeah not sure who added this. must have been done by the original author. I'll look into it

Blair2004 commented 4 years ago

Thank you 😊

On Jul 5, 2020 11:19 PM, "Daniel Moncada" notifications@github.com wrote:

@Blair2004 https://github.com/Blair2004 yeah not sure who added this. must have been done by the original author. I'll look into it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/danielmoncada/date-time-picker/issues/60#issuecomment-653946022, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIFR7ZVFZB7QKQKXPKN3ETR2D363ANCNFSM4OQPWNZA .

danielmoncada commented 4 years ago

@Blair2004 found the issue. For some reason there's a Pipe bound to automatically make it 2 digits. Need to figure out if removing it will cause other issues (outside of formatting).

dovlus commented 4 years ago

The reason it was working fine before is that debounce for input field value change was set to 500ms which was enough time to type in both digits. Debounce time was changed to 1ms in order to fix issue #34.

danielmoncada commented 4 years ago

@Dovlus right, though I feel that the debounce simply hid the initial issue. Looking to an alternate solution. Any suggestions?

Edit: got a fix. added debounce back, which allows for a 2-digit time to be entered. Added an immediate set of time value when lost focus (fixing the initial issue where pressing SET immediately after updating the time did not reflect what was inputted).

danielmoncada commented 4 years ago

fixed in https://github.com/danielmoncada/date-time-picker/pull/63