Inputmask: 12Hr Format time Hour error

Created on 31 May 2019  路  3Comments  路  Source: RobinHerbots/Inputmask

Hi firstly thank you I love the mask you've made it is just what I needed.

Describe the bug
So based on the sample given it expects a 12 hour format time, if you first type in "09:20 AM" it is correct, now try typing again replace the 09 and type in 1 and you will get 19:20 AM.

To Reproduce
Steps to reproduce the behavior:

  1. First type in "09:20 AM"
  2. Next replace the 09 in "09:20 AM" and type in 1 and you will get 19:20 AM.

Expected behavior
My expectations are 1 cannot be typed when the digits next to it is between 3-9

Live example
https://jsbin.com/yeguhusiqu/edit?html,output

using google chrome

Dates Enhancement / Feature

Most helpful comment

@pikaclint ,

Version 5.x already gives a better result. If will show 12:20, but even that is not correct.

I'm currently focussing on the numeric alias. But I will fix this as soon I find some time.

I suppose the behavior should be when replacing 09 with one it shows 10:20 and put the caret after 1 ?

All 3 comments

@pikaclint ,

Version 5.x already gives a better result. If will show 12:20, but even that is not correct.

I'm currently focussing on the numeric alias. But I will fix this as soon I find some time.

I suppose the behavior should be when replacing 09 with one it shows 10:20 and put the caret after 1 ?

Hey man thanks for the fast response I think what you suggested would be a great fix. As long as it could avoid wrong data being inputted in the mask :)

@pikaclint,

The latest 5.x beta fixes the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

subarachnid picture subarachnid  路  5Comments

SujayKrishna picture SujayKrishna  路  7Comments

hrolick-git picture hrolick-git  路  5Comments

richard-flosi picture richard-flosi  路  3Comments

webmastervinay picture webmastervinay  路  4Comments