Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
ember-flatpickr
Advanced tools
This is an Ember addon that wraps the date picker Flatpickr. I wanted to use npm instead of bower, so ember-browserify is also required to get this working.
npm i -D flatpickr ember-browserify
ember install ember-flatpickr
{{ember-flatpickr
altInput=true
altFormat="Y-m-d"
dateFormat="M/D/Y"
enableTime=true
hourIncrement=1
maxDate=maxDate
minDate=minDate
minuteIncrement=5
onChangeAction="doSomeStuffOnChange"
onCloseAction="doSomeStuffOnClose"
timeFormat="H:i"
value=(mut dateValue)}}
Note: If you want the value to update when you select a date, and onChange
fires, you have to use the mut
helper.
Whenever a new date is selected, onChange
will set the value to the newly selected date. It will also fire the action onChangeAction
, and pass the new dateObject
to that action.This allows you to pass whatever action you may want in to happen on change.
maxDate
and minDate
are watched by observers, and will update the flatpickr instance whenever you change them. This allows you to do things like having two components, used as a range picker, and updating the minDate
and maxDate
to display valid date choices on each.
All options available to Flatpickr are available here.
Config Option | Type | Default | Description |
---|---|---|---|
altFormat | string | "F j, Y" | Show the user a readable date (as per altFormat), but return something totally different to the server. |
FAQs
An Ember addon that wraps the date picker Flatpickr
The npm package ember-flatpickr receives a total of 7,870 weekly downloads. As such, ember-flatpickr popularity was classified as popular.
We found that ember-flatpickr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.