Gathering detailed insights and metrics for date-range-picker
Gathering detailed insights and metrics for date-range-picker
Gathering detailed insights and metrics for date-range-picker
Gathering detailed insights and metrics for date-range-picker
npm install date-range-picker
Typescript
Module System
Node Version
NPM Version
JavaScript (85.58%)
CSS (10.7%)
Makefile (3.73%)
Total Downloads
42,877
Last Day
57
Last Week
174
Last Month
859
Last Year
10,880
29 Stars
152 Commits
2 Forks
5 Watching
3 Branches
3 Contributors
Minified
Minified + Gzipped
Latest Version
0.3.5
Package Id
date-range-picker@0.3.5
Size
23.71 kB
NPM Version
3.6.0
Node Version
5.6.0
Cumulative downloads
Total Downloads
Last day
-1.7%
57
Compared to previous day
Last week
-19.1%
174
Compared to previous week
Last month
52.6%
859
Compared to previous month
Last year
356.2%
10,880
Compared to previous year
a simple daterangepicker
compatibility for IE
This component relies on moment and moment-range, so you should include them first
$ npm install date-range-picker
$ bower install date-range-picker // or use bower
Include js in /dist
by tag , you can also require js by require('date-range-picker')
var configs1 = {
lang: 'zh-cn', // using language
numberOfCalendars: 1, // displaying month number
calendarType: 'day', // type of calendar, day, week or month, dafault 'day'
type: 'single', // single, range, terminal
time: true, // want display & ctrl hours and minutes or not
noCalendars: false, // want not display & ctrl calandar, default false
date: moment('2015-10-01 23:33'), // default date for type single
range: moment.range(['2015-10-01', '2015-10-08']), // default range for type range or terminal
minDate: moment('2015-09-30'), // limit minDate
maxDate: moment(), // limit maxDate
onSelect: function(date/range) {
//...
drp2.set('range', range); // set range in onSelect is no use
} // callback after select, return date or range with moment and moment-range object
}
/* Get a dom object named such as el1 first */
var drp1 = new DateRangePicker(el1, configs1);
console.log(drp1.date); // current date for type
console.log(drp1.range); // current range for type range and terminal
console.log(drp1.time.hours); // current hours array
console.log(drp1.time.minutes); // current minutes array
/* set a value and reload daterangepicker */
drp1.set('range', moment.range()); // support: date and range, and I'm not ensure set other props are useful.
/* clear daterangepicker */
drp1.clear();
/* support for shortcuts */
config.shortcuts = {
el: shortcutsEl, // default: null
btns: ['today', ...] // sort and which btn will be shown,
// default and only those option ['today', 'yesterday', 'lastWeek', 'custom']
}
// only support chinese, english and japanese , you can give me a PR for your language.
// in src/lang.js
{
today: 'todayStr', // such as: '今天'
yesterday: 'yesterdayStr', // such as: '昨天'
lastWeek: 'lastWeekStr', // for range and terminal. such as: '最近一周'
lastMonth: 'lastMonthStr', // for range and terminal. such as: '最近一月'
custom: 'customStr' // such as: '自定义'
};
/* support for dimension in single(developing) */
config.dimension = {
el: dimensionEl, // default: null
btns: ['day', ...] // sort and which btn will be shown,
// default and only those option ['day', 'week', 'month']
}
// only support chinese, english and japanese, you can give me a PR for your language.
// in src/lang.js
{
day: 'dayStr', // such as: '日'
week: 'weekStr', // such as: '周'
month: 'monthStr' // such as: '月'
};
$ git clone && make dev && view localhost:8888
Give me issue please~
Easily transform to angular directive or react component (in new project)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More