Yang Hao Chang

Results 1 comments of Yang Hao Chang

@slsay 我也遇到同樣的問題,而我是參考 rmc-date-picker 的寫法解決: 注意到rmc-date-picker的底層也是用rmc-picker寫的: [DatePicker.tsx](https://github.com/react-component/m-date-picker/blob/master/src/DatePicker.tsx) [Popup.tsx](https://github.com/react-component/m-date-picker/blob/master/src/DatePicker.tsx) 作者在DatePicker中自定義`getValue()` 便可解決PopupMixin讀不到Picker內建`getValue()`的問題: ```js getDate() { return this.clipDate(this.state.date || this.getDefaultMinDate()); } // used by rmc-picker/lib/PopupMixin.js getValue() { return this.getDate(); } ``` 這裡的getValue()最後返回的是 DatePicker 的選取值...