forms icon indicating copy to clipboard operation
forms copied to clipboard

Caolan form missing datetimelocal

Open sh3ngsh3ng opened this issue 3 years ago • 0 comments

npm install missing the chunk of code below:

var datetimeLocalWidget = input('datetime-local');
exports.datetimeLocal = function (options) {
    var opt = options || {};
    var w = datetimeLocalWidget(opt);
    w.formatValue = function (value) {
        if (!value) {
            return null;
        }

        var date = is.date(value) ? value : new Date(value);

        if (isNaN(date.getTime())) {
            return null;
        }

        return date.toISOString().slice(0, 23);
    };
    return w;
};

sh3ngsh3ng avatar Dec 13 '21 12:12 sh3ngsh3ng