diff --git a/.github/hour-minute-second.png b/.github/hour-minute-second.png new file mode 100644 index 0000000..2a8e2fc Binary files /dev/null and b/.github/hour-minute-second.png differ diff --git a/.github/year-month-day-hour-minute.png b/.github/year-month-day-hour-minute.png new file mode 100644 index 0000000..46bbd39 Binary files /dev/null and b/.github/year-month-day-hour-minute.png differ diff --git a/README.md b/README.md index dc59e14..3dd4da0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ react-mobile-datepicker provides a component that can set year, month and day by - is only 4k. - It does not depend on moment.js -## Screenshots +## Theme + ### default
@@ -34,7 +35,23 @@ react-mobile-datepicker provides a component that can set year, month and day by ### android-dark
-
+
+ +## Custom date unit + +set dateFormat for `['YYYY', 'MM', 'DD', 'hh', 'mm']` to configure year, month, day, hour, minute. + +
+ +
+ + +set dateFormat for `['hh', 'mm', 'ss']` to configure hour, minute and second. + +
+ +
+ ## Getting Started @@ -109,7 +126,8 @@ ReactDOM.render(, document.getElementById('react-box')); | isPopup | Boolean | true | whether as popup add a overlay | | isOpen | Boolean | false | whether to open datepicker | | theme | String | default | theme of datepicker, include 'default', 'dark', 'ios', 'android', 'android-dark' | -| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day format specified display text. E.g ['YYYY年', 'MM月', 'DD日']| +| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day, hour, minute, second format specified display text. E.g ['YYYY年', 'MM月', 'DD日']| +|showFormat | String | 'YYYY/MM/DD' | customize the format of the display title | | value | Date | new Date() | date value | | min | Date | new Date(1970, 0, 1) | minimum date | | max | Date | new Date(2050, 0, 1) | maximum date | diff --git a/examples/basic/index.js b/examples/basic/index.js index 642d68e..6d0126f 100644 --- a/examples/basic/index.js +++ b/examples/basic/index.js @@ -62,7 +62,7 @@ window.Perf = require('react-addons-perf');