Skip to content

Commit

Permalink
fix(react-scheduler): fix types (#3605)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krijovnick committed Dec 1, 2022
1 parent 2930d7c commit eeebfe9
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
Expand Up @@ -66,8 +66,8 @@ export const Cell = ({
</StyledTableCell>
);
Cell.propTypes = {
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
children: PropTypes.node,
className: PropTypes.string,
hasRightBorder: PropTypes.bool,
Expand Down
Expand Up @@ -245,8 +245,8 @@ Layout.propTypes = {
onFieldChange: PropTypes.func,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -221,8 +221,8 @@ Layout.propTypes = {
readOnly: PropTypes.bool,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -53,8 +53,8 @@ Daily.propTypes = {
]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -83,8 +83,8 @@ Monthly.propTypes = {
]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -74,8 +74,8 @@ Weekly.propTypes = {
]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -83,8 +83,8 @@ Yearly.propTypes = {
]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -203,8 +203,8 @@ EndRepeatEditor.propTypes = {
onFieldChange: PropTypes.func,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -224,8 +224,8 @@ MonthlyEditor.propTypes = {
selectComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -78,8 +78,8 @@ RadioGroup.propTypes = {
type: PropTypes.string.isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -154,8 +154,8 @@ YearlyEditor.propTypes = {
selectComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -56,8 +56,8 @@ Layout.propTypes = {
isDeleting: PropTypes.bool,
appointmentData: PropTypes.shape({
title: PropTypes.string,
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
rRule: PropTypes.string,
notes: PropTypes.string,
additionalInformation: PropTypes.string,
Expand Down
Expand Up @@ -69,8 +69,8 @@ export const Cell = ({
);
Cell.propTypes = {
formatDate: PropTypes.func.isRequired,
startDate: PropTypes.instanceOf(Date).isRequired,
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
className: PropTypes.string,
today: PropTypes.bool,
endOfGroup: PropTypes.bool,
Expand Down
Expand Up @@ -137,8 +137,8 @@ const CellBase = React.memo(({

CellBase.propTypes = {
formatDate: PropTypes.func.isRequired,
startDate: PropTypes.instanceOf(Date).isRequired,
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
className: PropTypes.string,
today: PropTypes.bool,
otherMonth: PropTypes.bool,
Expand Down
Expand Up @@ -113,8 +113,8 @@ export const Cell = ({

Cell.propTypes = {
formatDate: PropTypes.func.isRequired,
startDate: PropTypes.instanceOf(Date).isRequired,
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]).isRequired,
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
className: PropTypes.string,
today: PropTypes.bool,
endOfGroup: PropTypes.bool,
Expand Down
Expand Up @@ -53,8 +53,8 @@ export const TickCell = ({
);

TickCell.propTypes = {
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endOfGroup: PropTypes.bool,
groupingInfo: PropTypes.arrayOf(PropTypes.object),
isAllDay: PropTypes.bool,
Expand Down
Expand Up @@ -120,8 +120,8 @@ export const Cell = ({
};

Cell.propTypes = {
startDate: PropTypes.instanceOf(Date),
endDate: PropTypes.instanceOf(Date),
startDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
endDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
children: PropTypes.node,
className: PropTypes.string,
currentTimeIndicatorPosition: PropTypes.string,
Expand Down

0 comments on commit eeebfe9

Please sign in to comment.