UNPKG

dtd

Version:

根据数梦工场视觉规范打造的组件库,感谢react-components和ant design

1 lines 887 B
import*as PropTypes from"prop-types";import defaultLocals from"../../locale-provider/default";function noop(){}export default{propTypes:{className:PropTypes.string,locale:PropTypes.object,style:PropTypes.object,visible:PropTypes.bool,onSelect:PropTypes.func,prefixCls:PropTypes.string,onChange:PropTypes.func,onOk:PropTypes.func},getDefaultProps:function(){return{locale:defaultLocals.DatePicker.lang,style:{},visible:!0,prefixCls:"rc-calendar",className:"",onSelect:noop,onChange:noop,onClear:noop,renderFooter:function(){return null},renderSidebar:function(){return null}}},shouldComponentUpdate:function(o){return this.props.visible||o.visible},getFormat:function(){var o=this.props.format,e=this.props,t=e.locale,r=e.timePicker;return o||(o=r?t.dateTimeFormat:t.dateFormat),o},focus:function(){this.rootInstance&&this.rootInstance.focus()},saveRoot:function(o){this.rootInstance=o}};