Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random prop types #39

Merged
merged 3 commits into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ https://github.com/sharetribe/flex-template-web/

## Upcoming version 2019-XX-XX

- [fix] Fix proptype checks for FieldDateAndTimeInput and FieldDateInput.
[#39](https://github.com/sharetribe/ftw-time/pull/39)
- [fix] Fix same date detection on TimeRange component.
[#38](https://github.com/sharetribe/ftw-time/pull/38)
- [change] Hide inbox tabs if user doesn't have a listing.
Expand Down
2 changes: 0 additions & 2 deletions src/components/FieldDateInput/FieldDateInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ FieldDateInputComponent.defaultProps = {
showLabelAsDisabled: false,
placeholderText: null,
onChange: null,
isDayBlocked: null,
};

FieldDateInputComponent.propTypes = {
Expand All @@ -123,7 +122,6 @@ FieldDateInputComponent.propTypes = {
input: object.isRequired,
meta: object.isRequired,
onChange: func,
isDayBlocked: func,
};

const FieldDateInput = props => {
Expand Down
7 changes: 3 additions & 4 deletions src/forms/BookingTimeForm/FieldDateAndTimeInput.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { func, object, string } from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage, intlShape } from '../../util/reactIntl';
import { intlShape } from '../../util/reactIntl';
import {
getStartHours,
getEndHours,
Expand Down Expand Up @@ -424,9 +424,8 @@ class FieldDateAndTimeInput extends Component {
findNextBoundary(timeZone, TODAY)
);

const startTimeLabel = <FormattedMessage id="FieldDateTimeInput.startTime" />;
const endTimeLabel = <FormattedMessage id="FieldDateTimeInput.endTime" />;

const startTimeLabel = intl.formatMessage({ id: 'FieldDateTimeInput.startTime' });
const endTimeLabel = intl.formatMessage({ id: 'FieldDateTimeInput.endTime' });
/**
* NOTE: In this template the field for the end date is hidden by default.
* If you want to enable longer booking periods, showing the end date in the form requires some code changes:
Expand Down