From 95699887ac75de5dff6bd25278289e31e4745482 Mon Sep 17 00:00:00 2001 From: Antony Shaleynikov Date: Wed, 1 Mar 2017 23:58:06 +0300 Subject: Added 12hours display support --- examples/12hours.html | 0 examples/12hours.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 examples/12hours.html create mode 100644 examples/12hours.js (limited to 'examples') diff --git a/examples/12hours.html b/examples/12hours.html new file mode 100644 index 0000000..e69de29 diff --git a/examples/12hours.js b/examples/12hours.js new file mode 100644 index 0000000..18fb626 --- /dev/null +++ b/examples/12hours.js @@ -0,0 +1,30 @@ +/* eslint no-console:0 */ + +import 'rc-time-picker/assets/index.less'; + +import React from 'react'; +import ReactDom from 'react-dom'; + +import moment from 'moment'; + +import TimePicker from 'rc-time-picker'; + +const showSecond = false; +const str = showSecond ? 'HH:mm:ss' : 'HH:mm'; + +const now = moment().hour(14).minute(30); + +function onChange(value) { + console.log(value && value.format(str)); +} + +ReactDom.render( + , + document.getElementById('__react-content') +); -- cgit v1.2.3