input time mask using jquery

后端 未结 5 1464
庸人自扰
庸人自扰 2021-02-06 11:37

I am using meioMask – a jQuery mask plugin to put time mask in a textbox. Here is the JsFiddle. It\'s working well. But I also need to put hh:mm in the textbox, to

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 12:35

    If you want it simple and clean here's a quick, but complete, demo (See: http://jsfiddle.net/bEJB2/ ) that includes a placeholder and a mask working together. It uses the jQuery Plugin jquery.maskedinput. The JavaScript is so clean and clear

    Demo of Mask for 12 Hour AM/PM Input Field w/ Place Holder

    I would echo what @YiJiang said about PolyFills and Modernizr for placeholder handling in non-HTML5 browsers as well.

提交回复
热议问题