aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/value-and-defaultValue.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/value-and-defaultValue.js')
-rw-r--r--examples/value-and-defaultValue.js179
1 files changed, 91 insertions, 88 deletions
diff --git a/examples/value-and-defaultValue.js b/examples/value-and-defaultValue.js
index 48c85cf..4668310 100644
--- a/examples/value-and-defaultValue.js
+++ b/examples/value-and-defaultValue.js
@@ -1,100 +1,103 @@
1webpackJsonp([6],{ 1webpackJsonp([0],{
2
3/***/ 149:
4/***/ (function(module, __webpack_exports__, __webpack_require__) {
5
6"use strict";
7Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(13);
9/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
10/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(23);
11/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
12/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(15);
13/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
14/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(14);
15/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
16/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less__ = __webpack_require__(29);
17/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_rc_time_picker_assets_index_less__);
18/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(5);
19/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
20/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom__ = __webpack_require__(8);
21/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom__);
22/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment__ = __webpack_require__(18);
23/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_moment__);
24/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_time_picker__ = __webpack_require__(22);
25
26
27
28
29/* eslint no-console:0 */
30
31
32
33
2 34
3/***/ 0:
4/***/ (function(module, exports, __webpack_require__) {
5 35
6 module.exports = __webpack_require__(322);
7 36
8 37
38var App = function (_React$Component) {
39 __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(App, _React$Component);
40
41 function App() {
42 var _ref;
43
44 var _temp, _this, _ret;
45
46 __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, App);
47
48 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
49 args[_key] = arguments[_key];
50 }
51
52 return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = App.__proto__ || Object.getPrototypeOf(App)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
53 value: __WEBPACK_IMPORTED_MODULE_7_moment___default()()
54 }, _this.handleValueChange = function (value) {
55 console.log(value && value.format('HH:mm:ss'));
56 _this.setState({ value: value });
57 }, _this.clear = function () {
58 _this.setState({
59 value: undefined
60 });
61 }, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
62 }
63
64 __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(App, [{
65 key: 'render',
66 value: function render() {
67 return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(
68 'div',
69 null,
70 __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rc_time_picker__["a" /* default */], {
71 defaultValue: this.state.value,
72 onChange: this.handleValueChange
73 }),
74 __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_rc_time_picker__["a" /* default */], {
75 value: this.state.value,
76 onChange: this.handleValueChange
77 }),
78 __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(
79 'button',
80 { onClick: this.clear },
81 'clear'
82 )
83 );
84 }
85 }]);
86
87 return App;
88}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);
89
90__WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(App, null), document.getElementById('__react-content'));
91
9/***/ }), 92/***/ }),
10 93
11/***/ 322: 94/***/ 331:
12/***/ (function(module, exports, __webpack_require__) { 95/***/ (function(module, exports, __webpack_require__) {
13 96
14 'use strict'; 97module.exports = __webpack_require__(149);
15 98
16 var _classCallCheck2 = __webpack_require__(188);
17
18 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
19
20 var _possibleConstructorReturn2 = __webpack_require__(189);
21
22 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
23
24 var _inherits2 = __webpack_require__(258);
25
26 var _inherits3 = _interopRequireDefault(_inherits2);
27
28 __webpack_require__(2);
29
30 var _react = __webpack_require__(3);
31
32 var _react2 = _interopRequireDefault(_react);
33
34 var _reactDom = __webpack_require__(38);
35
36 var _reactDom2 = _interopRequireDefault(_reactDom);
37
38 var _moment = __webpack_require__(184);
39
40 var _moment2 = _interopRequireDefault(_moment);
41
42 var _rcTimePicker = __webpack_require__(185);
43
44 var _rcTimePicker2 = _interopRequireDefault(_rcTimePicker);
45
46 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
48 var App = function (_React$Component) {
49 (0, _inherits3.default)(App, _React$Component);
50
51 function App() {
52 var _temp, _this, _ret;
53
54 (0, _classCallCheck3.default)(this, App);
55
56 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
57 args[_key] = arguments[_key];
58 }
59
60 return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
61 value: (0, _moment2.default)()
62 }, _this.handleValueChange = function (value) {
63 console.log(value && value.format('HH:mm:ss'));
64 _this.setState({ value: value });
65 }, _this.clear = function () {
66 _this.setState({
67 value: undefined
68 });
69 }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
70 }
71
72 App.prototype.render = function render() {
73 return _react2.default.createElement(
74 'div',
75 null,
76 _react2.default.createElement(_rcTimePicker2.default, {
77 defaultValue: this.state.value,
78 onChange: this.handleValueChange
79 }),
80 _react2.default.createElement(_rcTimePicker2.default, {
81 value: this.state.value,
82 onChange: this.handleValueChange
83 }),
84 _react2.default.createElement(
85 'button',
86 { onClick: this.clear },
87 'clear'
88 )
89 );
90 };
91
92 return App;
93 }(_react2.default.Component); /* eslint no-console:0 */
94
95 _reactDom2.default.render(_react2.default.createElement(App, null), document.getElementById('__react-content'));
96 99
97/***/ }) 100/***/ })
98 101
99}); 102},[331]);
100//# sourceMappingURL=value-and-defaultValue.js.map \ No newline at end of file 103//# sourceMappingURL=value-and-defaultValue.js.map \ No newline at end of file