[MM-56512] Impossible to set a custom reminder on the same day of following months (#25918)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Vishal Bisht 2024-01-22 20:16:37 +05:30 committed by GitHub
parent ae33de57ff
commit d2da8d3a50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,7 @@ const DateTimeInputContainer: React.FC<Props> = (props: Props) => {
const setTimeAndOptions = () => {
const currentTime = getCurrentMomentForTimezone(timezone);
let startTime = moment(time).startOf('day');
if (time.date() === currentTime.date()) {
if (currentTime.isSame(time, 'date')) {
startTime = getRoundedTime(currentTime);
}
setTimeOptions(getTimeInIntervals(startTime));