-
Notifications
You must be signed in to change notification settings - Fork 273
feat(ui5-datepicker): implementing min and max date limits #1040
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
feat(ui5-datepicker): implementing min and max date limits #1040
Conversation
…ponents into datepicker-min-max-date-implementation
packages/main/src/Calendar.js
Outdated
if (this._minDate) { | ||
this.timestamp = this._minDate / 1000; | ||
} else { | ||
this.timestamp = (new Date(-62135596800000)).getTime() / 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number. Please use a constant that explains what this is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
event.preventDefault(); | ||
|
||
await RenderScheduler.whenFinished(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was meant to be "unofficial" - for the tests only. I'm fine for the moment, but we need to provide a public function for the same.
@pskelin
packages/main/src/Calendar.js
Outdated
*/ | ||
minDate: { | ||
type: String, | ||
defaultValue: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to set "undefined" here? Isn't it undefined by default (or is it empty string)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an empty string, but still a falsy value so it can be removed, thanks.
packages/main/src/Calendar.js
Outdated
*/ | ||
maxDate: { | ||
type: String, | ||
defaultValue: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hello team, can you please review this PR.
Regards,
Tsanislav