@ianwalter/supports-date-input

2.0.0 • Public • Published

@ianwalter/supports-date-input

Detect whether a browser environment or user agent string supports input[type=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

Package Sidebar

Install

npm i @ianwalter/supports-date-input

Weekly Downloads

0

Version

2.0.0

License

SEE LICENSE IN LICENSE

Unpacked Size

6.52 kB

Total Files

9

Last publish

Collaborators

  • ianwalter