Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
The do it yourself date picker. It makes as no assumptions how it's shown on the page. See demo.
<div id='datepickr'></div>
<script>
var el = document.getElementById('datepickr');
new Datepickr(el, function(res) {
// console.log(res);
});
</script>
new Datepickr(element, callback, options);
The callback returns an array of arrayed dates whenever a date is selected.
[
[1412481600000,1],
[1413864000000,1],
[1413950400000,1],
[1414468800000,1]
]
The first field value is a timestamp along with 1
or 0.5
depending on
whether halfdays are enabled as an option or not.
Option | Default Value | Description |
---|---|---|
weekdays | An array of weekday strings in English | Option for translation |
months | An array of month strings in English | Option for translation |
startYear | Current year | Start the date picker on a particular year |
startMonth | Current month | Start the date picker on a particular month |
minDate | null | a timestamp representing a maximum date the pager should page |
maxDate | null | a timestamp representing a minimum date the pager should page |
halfDay | false | Enables halfday selection of dates |
omitPast | false | Prevent selecting days in the past |
omitFuture | false | Prevent selecting days in the future |
omitWeekends | false | Prevent selecting weekends |
omitDays | Empty array | Pass a timestamp array of dates to prevent the selection of |
activeDays | Empty array | Pass an array of arrayed dates ie. [[[1413950400000,1],[1414468800000,0.5] that are auto selected on load |
utc | false | Should date output be interpreted as UTC |
singleSelection | false | Limit days selection to one day. |
To see examples of each option see the demos.
var pickr = new Datepickr(el);
pickr.options({
halfDay: true
});
// npm install datepickr
var datepickr = require('datepickr')
datepickr(el, function(res) {
console.log(res);
});
npm install && npm start
npm run build
Code originally based off of datepickr.
v1.4.2
FAQs
A do it yourself Date picker.
The npm package datepickr receives a total of 558 weekly downloads. As such, datepickr popularity was classified as not popular.
We found that datepickr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.