jquerydatetimejquery-inputmask

Jquery inputmask "dd-mm-yyyy hh:mm"


How to configure to achieve "dd-mm-yyyy hh:mm" format?

$('input').inputmask({
                mask: "1-2-y h:s",
                placeholder: "dd-mm-yyyy hh:mm",
                leapday: "29-02-",
                separator: "-",
                alias: "dd-mm-yyyy"
            });

This not work, it shows "dd-mm-yyyy h:s" and I can edit only "dd-mm-yyyy".

inputmask

https://jsfiddle.net/re4qxxr1/


Solution

  • try this will help you:

    $('input').inputmask("datetime",{
         mask: "1-2-y h:s", 
         placeholder: "dd-mm-yyyy hh:mm", 
         leapday: "-02-29", 
         separator: "-", 
         alias: "dd-mm-yyyy"
    });
    

    Fiddle: https://jsfiddle.net/53nomjyb/193/