How do I combine datetime field type with the mask plug-in?
How do I combine datetime field type with the mask plug-in?

When using datetime as an field type it would be good to check the input when the user types in date and/or time directly. Therefore I am looking for a combination of both field types, 'datatime' and 'mask' (Masked Inputs Plug-in) without writing my own custom field type plug-in.
{
label: "Date:",
name: "Date",
// type: "mask", does not make sense as it will be overwritten by the 'datetime' line 6
// mask: "00.00.0000 00:00",
type: 'datetime',
def: function () { return new Date(); },
format: 'DD.MM.YYYY HH:mm',
opts: {
showWeekNumber: true
},
attr: {
maxlength: 16
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That's the kicker. That's the only way I'm afraid. There is no way to use multiple plug-ins on a single field at the moment - the only option would be to modify the built in
datetime
field type to do what you are looking for.Sorry I don't have better news.
Allan
Thank you for the answer and confirmation of my expectation, Allan.