RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Can't able to use Inputmask With Optional time (ex:- 05:04 am / 05:04 pm) In Date Time #1764

Open DeepGandhi1602 opened 6 years ago

DeepGandhi1602 commented 6 years ago

Hiii I want to use Input mask for Date Time In which Date is recommended and time is optional but it is in (ex:- 05:04 am / 05:04 pm) following is the code for it.

'datetimeOptional': { mask: "1/2/y [h:s t\m]", placeholder: "dd/mm/yyyy hh:mm xm", alias: "datetime", hourFormat: "12", },

help me to solve problem Thank You in Advance

RobinHerbots commented 6 years ago

@DeepGandhi1602 ,

I am working on a new implementation of datetimes in version 4.x of the inputmask. I will keep this requirement in mind.

pbarney commented 6 years ago

Any updates on this?

DeepGandhi1602 commented 6 years ago

Still Waiting......

RobinHerbots commented 6 years ago

@DeepGandhi1602 ,

I will start on this in the coming days.

RobinHerbots commented 6 years ago

@DeepGandhi1602 , @pbarney ,

The current on github supports optional parts in the inputformat. Ex

   Inputmask({
            alias: "datetime",
            inputFormat: "dd/mm/yyyy [hh:MM]"
        }).mask("test1");

BUT, there are other issues which causes the experience of it as not good.

Anyway, I am working on it ;-)

ashokLogicalwings commented 6 years ago

I got a chance on that and it worked.

And called a jquery inputmask function $(document).ready(function(){ $("#time").inputmask(); });