Skip to content

Caolan form missing datetimelocal #221

@sh3ngsh3ng

Description

@sh3ngsh3ng

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;
};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions