
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ng-datetimerange-picker2
Advanced tools
一个全新的简洁美观的日期时间范围选择器(样式参考iviewui)


bower:
bower install
npm:
npm install
dev:
gulp serve
build:
gulp
a. 引入文件
<link rel="stylesheet" href="../node_modules/ng-datetimerange-picker/dist/styles/ngDatetimeRangePicker.css">
<script src="../node_modules/ng-datetimerange-picker/dist/scripts/ngDatetimeRangePicker.js"></script>
b. 在模块中进行依赖
angular.module('yourModule', ['ngDatetimeRangePicker'])
c. 使用指令ng-date-picker
<ng-date-picker
id="test-picker"
style="width: 280px;"
value="rctrl.dateConf.value"
format="{{rctrl.dateConf.format}}"
placeholder="{{rctrl.dateConf.placeholder}}"
options="rctrl.dateConf.options"
on-ok="rctrl.okFunc(value)"
on-clear="rctrl.clearFunc()"
on-change="rctrl.changeFunc(value)"
is-global="rctrl.dateConf.isGlobal"
min-day="rctrl.dateConf.minDay"
max-day="rctrl.dateConf.maxDay"
min-view="rctrl.dateConf.minView"
pos="right"></ng-date-picker>
目前总共提供以下配置选项:
center right cover cover-center cover-left cover-right。参考以下配置:
this.okFunc = function(value){
console.log('okkkkkkkkkk', value);
}
this.clearFunc = function(){
console.log('clearrrrrrr');
}
this.changeFunc = function(value){
console.log('changeeeeee', value);
}
this.dateConf = {
isGlobal: true,
value: {
start: moment(),
end: moment().month(11).add(1, 'y').add(2, 'd').add(13, 'h').add(2, 'm').add(3, 's')
},
format: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择日期范围',
minDay: moment().subtract(30, 'd'),
maxDay: moment(),
minView: 'time',
options: [{
name: '今天',
start: moment().startOf('day'),
end: moment().endOf('day')
},
{
name: '昨天',
start: moment(),
end: moment().subtract(1, 'd')
},
{
name: '当前月',
start: moment().startOf('month'),
end: moment()
},
{
name: '一年又两个月',
start: moment().subtract(1, 'M'),
end: moment().add(1, 'y').add(1, 'M')
}
]
};
FAQs
The npm package ng-datetimerange-picker2 receives a total of 3 weekly downloads. As such, ng-datetimerange-picker2 popularity was classified as not popular.
We found that ng-datetimerange-picker2 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.