| | |
| | | var DateTimeField, DateTimePicker, Glyphicon, React, moment; |
| | | var DateTimeField, DateTimePicker, Glyphicon, React, moment, _; |
| | | |
| | | React = require('react'); |
| | | |
| | | DateTimePicker = require('./DateTimePicker'); |
| | | |
| | | moment = require('moment'); |
| | | |
| | | _ = require('lodash'); |
| | | |
| | | Glyphicon = require('react-bootstrap').Glyphicon; |
| | | |
| | |
| | | onChange: React.PropTypes.func, |
| | | format: React.PropTypes.string, |
| | | inputFormat: React.PropTypes.string, |
| | | inputProps: React.PropTypes.object |
| | | inputProps: React.PropTypes.object, |
| | | defaultText: React.PropTypes.string |
| | | }, |
| | | getDefaultProps: function() { |
| | | return { |
| | |
| | | }, |
| | | viewDate: moment(this.props.dateTime, this.props.format, true).startOf("month"), |
| | | selectedDate: moment(this.props.dateTime, this.props.format, true), |
| | | inputValue: moment(this.props.dateTime, this.props.format, true).format(this.props.inputFormat) |
| | | inputValue: typeof this.props.defaultText == 'undefined' ? this.props.defaultText : moment(this.props.dateTime, this.props.format, true).format(this.props.inputFormat) |
| | | }; |
| | | }, |
| | | componentWillReceiveProps: function(nextProps) { |