UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

51 lines (48 loc) 1.19 kB
import noop from 'lodash/noop'; import enUs from '../locale/en_US'; export default { getDefaultProps: function getDefaultProps() { return { locale: enUs, style: {}, visible: true, prefixCls: 'rc-calendar', className: '', onSelect: noop, onChange: noop, onClear: noop, renderFooter: function renderFooter() { return null; }, renderSidebar: function renderSidebar() { return null; } }; }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }, getFormat: function getFormat() { var format = this.props.format; var _this$props = this.props, locale = _this$props.locale, timePicker = _this$props.timePicker; if (!format) { if (timePicker) { format = locale.dateTimeFormat; } else { format = locale.dateFormat; } } return format; }, focus: function focus() { if (this.rootInstance) { this.rootInstance.focus(); } }, saveRoot: function saveRoot(root) { this.rootInstance = root; } }; //# sourceMappingURL=CommonMixin.js.map