|
1 | 1 | # bootstrap-material-datetimepicker
|
2 | 2 | Material DateTimePicker
|
3 | 3 |
|
4 |
| -Created by [T00rk/bootstrap-material-datetimepicker](https://github.com/T00rk/bootstrap-material-datetimepicker), fork by [drblue](https://github.com/drblue/) due to incorrect package.json-file. |
| 4 | +Originaly designed for Bootstrap Material, the V2.0 is now completely standalone and responsive. |
5 | 5 |
|
6 |
| -### Install |
| 6 | +### Updates |
7 | 7 |
|
8 |
| - npm install drblue/bootstrap-material-datetimepicker --save |
| 8 | +| Date | Author | Description | |
| 9 | +| ----------------- | ----------------- | ------------------------------------------------------ | |
| 10 | +| 2015-10-19 | benletchford | Fixed not being able to tab into input | |
| 11 | +| 2015-10-19 | drblue | Fixed erroneous package.json-file | |
| 12 | +| 2015-10-19 | Perdona | Fix auto resize when month has 6 weeks | |
| 13 | +| 2015-07-01 | T00rk | Redesigned element without using modal | |
| 14 | +| 2015-06-16 | T00rk | Use Timepicker alone / Display short time (12 hours) | |
| 15 | +| 2015-06-13 | T00rk | Fixed issue with HTML value tag | |
| 16 | +| 2015-05-25 | T00rk | Changed repo name to bootstrap-material-datetimepicker * | |
| 17 | +| 2015-05-12 | T00rk | Added parameters for button text | |
| 18 | +| 2015-05-05 | Sovanna | FIX undefined _minDate in isBeforeMaxDate func | |
| 19 | +| 2015-04-10 | T00rk | Little change in clock design | |
| 20 | +| 2015-04-10 | Peterzen | Added bower and requirejs support | |
| 21 | +| 2015-04-08 | T00rk | Fixed problem on locale switch | |
| 22 | +| 2015-03-04 | T00rk | Added Time picker | |
| 23 | +(\*) File names have been changed |
| 24 | + |
| 25 | +bootstrap-material-datepicker.js => bootstrap-material-date**time**picker.js |
| 26 | + |
| 27 | +bootstrap-material-datepicker.css => bootstrap-material-date**time**picker.css |
| 28 | + |
| 29 | +### Prerequisites |
| 30 | + |
| 31 | +jquery [http://jquery.com/download/](http://jquery.com/download/) |
| 32 | + |
| 33 | +momentjs [http://momentjs.com/](http://momentjs.com/) |
| 34 | + |
| 35 | +Google Material Icon Font `<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">` |
| 36 | + |
| 37 | + |
| 38 | +### Live Example |
| 39 | + |
| 40 | +Click [here](http://t00rk.github.io/bootstrap-material-datetimepicker/) to see |
| 41 | + |
| 42 | +### Usage |
| 43 | + |
| 44 | + $('input').bootstrapMaterialDatePicker(); |
| 45 | + |
| 46 | +### bower |
| 47 | + |
| 48 | + bower install bootstrap-material-datetimepicker |
9 | 49 |
|
| 50 | +### Parameters |
| 51 | + |
| 52 | +| Name | Type | Description | |
| 53 | +| ----------------- | ----------------------------- | --------------------------------------------- | |
| 54 | +| **format** | String | MomentJS Format | |
| 55 | +| **shortTime** | Boolean | true => Display 12 hours AM|PM | |
| 56 | +| **minDate** | (String\|Date\|Moment) | Minimum selectable date | |
| 57 | +| **maxDate** | (String\|Date\|Moment) | Maximum selectable date | |
| 58 | +| **currentDate** | (String\|Date\|Moment) | Initial Date | |
| 59 | +| **date** | Boolean | true => Has Datepicker | |
| 60 | +| **time** | Boolean | true => Has Timepicker | |
| 61 | +| **cancelText** | String | Text for the cancel button (default: Cancel) | |
| 62 | +| **okText** | String | Text for the OK button (default: OK) | |
| 63 | + |
| 64 | + |
| 65 | +### Events |
| 66 | + |
| 67 | +| Name | Parameters | Description | |
| 68 | +| ----------------- | ------------------------- | ------------------------------------------------- | |
| 69 | +| **beforeChange** | event, date | OK button is clicked | |
| 70 | +| **change** | event, date | OK button is clicked and input value is changed | |
| 71 | +| **dateSelected** | event, date | New date is selected | |
| 72 | + |
| 73 | + |
| 74 | +### Methods |
| 75 | + |
| 76 | + $('input').bootstrapMaterialDatePicker('setDate', moment()); |
| 77 | + |
| 78 | +| Name | Parameter | Description | |
| 79 | +| ----------------- | ------------------------- | ----------------------------- | |
| 80 | +| **setDate** | (String\|Date\|Moment) | Set initial date | |
| 81 | +| **setMinDate** | (String\|Date\|Moment) | Set minimum selectable date | |
| 82 | +| **setMaxDate** | (String\|Date\|Moment) | Set maximum selectable date | |
| 83 | +| **destroy** | NULL | Destroy the datepicker | |
| 84 | + |
| 85 | + |
0 commit comments