79823506

Date: 2025-11-18 15:08:19
Score: 2.5
Natty:
Report link

I am having the same issue with the input, the partial solution I came up with is using a number for the "hours" part of the input mask, so that can be negative:

export const maskC = 'H:M';

export const maskObj = {
  H: {
    mask: Number,
    scale: 0,
    min: -24,
    max: 24
  },
  M: {
    mask: MaskedRange,
    from: 0,
    to: 59,
    maxLength: 2,
  },
};

The missing part is if you want to make sure that hours take two digits, now values like -1:00 are accepted. The follow up would be padding with zeros in this section.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I am having the same issue
  • Low reputation (1):
Posted by: Bernardo Borges