053e214c86
* PublishReleaseDate: improve calendar error handling Ticket: 1738 - Report invalid `minute` and `day`. The 3rd-party widget auto-corrects the other fields. Don't think there is a way to make it autocorrect for all. - Report invalid range (cannot set to future date). * Block form on releaseDate error instead of silently sending last valid value which does not tally with what's on screen.
16 lines
632 B
JavaScript
16 lines
632 B
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectPublishFormValue } from 'redux/selectors/publish';
|
|
import { doUpdatePublishForm } from 'redux/actions/publish';
|
|
import PublishReleaseDate from './view';
|
|
|
|
const select = (state) => ({
|
|
releaseTime: makeSelectPublishFormValue('releaseTime')(state),
|
|
releaseTimeEdited: makeSelectPublishFormValue('releaseTimeEdited')(state),
|
|
releaseTimeError: makeSelectPublishFormValue('releaseTimeError')(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
updatePublishForm: (value) => dispatch(doUpdatePublishForm(value)),
|
|
});
|
|
|
|
export default connect(select, perform)(PublishReleaseDate);
|