Skip to content

Issue 5801 #5809

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

Merged
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
13 changes: 7 additions & 6 deletions src/shared/components/Settings/Profile/Education/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,10 @@ export default class Education extends ConsentComponent {
}

onUpdateDate(date, timePeriod) {
if (date) {
const { newEducation: oldEducation } = this.state;
const newEducation = { ...oldEducation };
newEducation[timePeriod] = date;
this.setState({ newEducation, isSubmit: false });
}
const { newEducation: oldEducation } = this.state;
const newEducation = { ...oldEducation };
newEducation[timePeriod] = date || '';
this.setState({ newEducation, isSubmit: false });
}

/**
Expand Down Expand Up @@ -530,6 +528,7 @@ export default class Education extends ConsentComponent {
<div styleName="field col-2">
<DatePicker
readOnly
showClearDate
numberOfMonths={1}
isOutsideRange={moment().subtract(1, 'd')}
date={newEducation.timePeriodFrom}
Expand Down Expand Up @@ -559,6 +558,7 @@ export default class Education extends ConsentComponent {
newEducation.graduated ? (
<DatePicker
readOnly
showClearDate
numberOfMonths={1}
isOutsideRange={moment().subtract(1, 'd')}
date={newEducation.timePeriodTo}
Expand All @@ -569,6 +569,7 @@ export default class Education extends ConsentComponent {
) : (
<DatePicker
readOnly
showClearDate
numberOfMonths={1}
date={newEducation.timePeriodTo}
id="date-to1"
Expand Down
14 changes: 14 additions & 0 deletions src/shared/components/Settings/Profile/Education/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ $checkbox-bg-selected: $tc-dark-blue;
flex-direction: column;
align-items: left;

:global {
.SingleDatePickerInput {
&__showClearDate {
padding-right: 0;
}

&_clearDate {
padding: 8px 10px;
top: 20px;
background: transparent;
}
}
}

@include upto-sm {
padding-bottom: 0;
}
Expand Down