2.0.0 • Published 5 years ago

@ianwalter/supports-date-input v2.0.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
5 years ago

@ianwalter/supports-date-input

Detect whether a browser environment or user agent string supports inputtype=date

npm page

About

Browser code originates from this StackOverflow answer.

Installation

yarn add @ianwalter/supports-date-input

Usage

Browser:

import supportsDateInput from '@ianwalter/supports-date-input'

// Firefox 65:
supportsDateInput() // => true

// Internet Explorer:
supportsDateInput() // => false

Node.js:

const supportsDateInput = require('@ianwalter/supports-date-input')

// Firefox 65:
supportsDateInput(req.get('user-agent')) // => true

// Internet Explorer:
supportsDateInput(req.get('user-agent')) // => false

License

Apache 2.0 with Commons Clause - See LICENSE

 

Created by Ian Walter