From 2d35a1960630251f58b1218a4ef3ef1121821d18 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 3 Jun 2015 20:12:49 +0800 Subject: [PATCH] fix startOfWeek --- components/datepicker/index.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/datepicker/index.jsx b/components/datepicker/index.jsx index cfb1eb52f4..bf4d75db40 100644 --- a/components/datepicker/index.jsx +++ b/components/datepicker/index.jsx @@ -5,6 +5,8 @@ var GregorianCalendar = require('gregorian-calendar'); var zhCn = require('gregorian-calendar/lib/locale/zh-cn'); var CalendarLocale = require('rc-calendar/lib/locale/zh-cn'); var DateTimeFormat = require('gregorian-calendar-format'); +var defaultCalendarValue = new GregorianCalendar(zhCn); +defaultCalendarValue.setTime(Date.now()); module.exports = React.createClass({ getInitialState: function () { @@ -38,6 +40,7 @@ module.exports = React.createClass({ disabledDate={this.state.disabled} locale={CalendarLocale} orient={['top', 'left']} + defaultValue={defaultCalendarValue} showTime={this.props.showTime} showClear={false} /> );