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

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Vishal Bisht
2024-01-22 20:16:37 +05:30
коммит произвёл GitHub
родитель ae33de57ff
Коммит d2da8d3a50

Просмотреть файл

@@ -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));