Installation
app-datepicker is distributed as an npm package and can be installed using your preferred package manager. The package includes TypeScript type definitions and works with all modern build tools.Package managers
Install app-datepicker using your preferred package manager:The
@next tag installs version 6.x, which is the current actively developed version. Version 6.0.0 is currently at release candidate 33.CDN usage
For quick prototyping or if you prefer not to use a build tool, you can load app-datepicker directly from a CDN:Prerequisites
Before using app-datepicker, ensure your project meets these requirements:Runtime requirements
ES2021 support
The element is compiled targeting ES2021 features. Older browsers may require transpilation.Required features:
- ES2021 syntax and APIs
- ES Modules support
- Web Components support
Lit 3.1.0 or higher
app-datepicker is built with Lit and requires version 3.1.0 or higher.
package.json
Dependencies
app-datepicker has minimal dependencies to keep your bundle size small:Core dependencies
package.json
Material Web Components (optional)
app-datepicker includes integration components that use Material Web Components:@material/mwc-button: ^0.27.0@material/mwc-dialog: ^0.27.0@material/mwc-icon-button: ^0.27.0@material/mwc-menu: ^0.27.0@material/mwc-textfield: ^0.27.0
These dependencies are only needed if you use
app-date-picker-input or app-date-picker-dialog. The core app-date-picker component doesn’t require them.Polyfills
For broader browser support, you may need polyfills for certain features:Required polyfills
Polyfill example
Here’s a snippet that loads polyfills via feature detection:index.html
Browser compatibility
app-datepicker works in the last 2 versions of all evergreen browsers:Tested browsers
- Chrome/Edge: 100+
- Firefox: 96+
- Safari: 15.4+
Untested but should work
- Edge: 18 and below (with polyfills)
- Safari: 13.1 and below (with polyfills)
Node.js requirements
For development and building:package.json
Package exports
app-datepicker provides multiple entry points for different components:Verification
After installation, verify that everything is working:Next steps
Now that you have app-datepicker installed, learn how to use it:Quick start guide
Get your first datepicker running in minutes
API reference
Explore all available properties and methods