From 8133e8cf3b37b2be764616493ade7c7a7678fce1 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Fri, 27 Nov 2015 16:15:05 +0800 Subject: add gregorianCalendarLocale prop --- examples/pick-time.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/pick-time.js b/examples/pick-time.js index 70de23d..178b622 100644 --- a/examples/pick-time.js +++ b/examples/pick-time.js @@ -10,7 +10,10 @@ import zhCn from 'gregorian-calendar/lib/locale/zh_CN'; import TimePicker from 'rc-time-picker'; import TimePickerLocale from 'rc-time-picker/src/locale/zh_CN'; -const formatter = new DateTimeFormat('HH:mm:ss'); +var showSecond = true; +var str = showSecond ? 'HH:mm:ss' : 'HH:mm'; + +const formatter = new DateTimeFormat(str); const now = new GregorianCalendar(zhCn); now.setTime(Date.now()); @@ -20,6 +23,12 @@ function onChange(value) { } ReactDom.render( - , + , document.getElementById('__react-content') ); + + +console.log(zhCn); \ No newline at end of file -- cgit v1.2.3