pd-datepicker-pc
v1.0.13
Published
date picker
Downloads
33
Readme
Build Setup
# install dependencies
npm install
# build for production with minification
npm run compile
install
npm i pd-datepicker-pc -S
need jquery and momentjs
example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="./src/pddatepicker.css"/>
<script src="https://unpkg.com/[email protected]/moment.js"></script>
<script src="https://unpkg.com/[email protected]/dist/jquery.js"></script>
<script src="dist/bundle.js"></script>
</head>
<body>
<div style="padding: 150px">
<input type="text" id="app">
</div>
<script>
$('#app').PdDatePicker({
initDate:'2016-11-19 15:27',
format:'YYYY-MM-DD HH:mm:ss'
}).on('change',function (data) {
console.log(data)
})
// PdDatePicker(id,options)
</script>
</body>
</html>
options default
startView: 3, @year{1} month{2} day{3} hour:min{4}
maxView: 1,
minView: 5,
initDate: null,
startDate: '2016-11-12',
endDate: null,
language: 'cn',
format: 'YYYY-MM-DD',
minuteRange: 1,
containerId: null,
hourList: null