caolan / caolan/forms

Caolan form missing datetimelocal

Open
#221 0 comments 0 reactions 0 assignees View on GitHub
Feature Requests pull request wanted
Dominant language
JavaScript
Stars
1k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.