bDate - Backend-driven Angularjs datepicker
| Demo |
What is this?
This is angularjs datepicker (like angular-ui datepicker) but with one serious difference: bDate Datepicker didn't count any date on client side, it works only with provided (json) data.
But why?
There are many reasons. But mostly it's made for people who want to take a control for datepicker from the backend.
Installation
-
download
with bower:
bower install bdate --saveor with npm:
npm install bdate --saveor download directly (please use latest release version).
-
add
.js
and.css
files(don't forget to include angular.js before)
-
add dependency to project:
angular; -
add directive to html:
b-model
- is the result of date selection;b-source
- Data with dates (may come from backend);b-settings
- Var with params (format, month and day names, etc);b-refresh
- Function wich calls every time, when you should update source (for example go to next month in popup). Should define with two args -m
for month andy
for year;
Features
- Date ranges aviable
- 20kb minified;
- No dependencies (only angularjs);
- No extra options (just pick a date);
- Easy to custom - you may provide custom id and class (in progress right now) for each element of each directive (if you have multiple ones);
- Able to set date model externally;
Date Raanges
b-range
- define ranges mode;
b-start-source
and b-end-source
work as b-source
(and insteado of them). Each work for start range and end range popups;
b-start-refresh
and b-end-refresh
- all the same as b-refresh
function, but wotks separately for start and end popup;
Settings format
Data format
Developing
Global dependencies: