1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00
* set date from today click to 12pm UTC

* make sure all dates are set to 12pm

* fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Scott Bishel 2023-02-14 08:32:37 -07:00 committed by GitHub
parent cc9a689c8b
commit 759a8bb76a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -302,7 +302,7 @@ describe('properties/dateRange', () => {
// About `Date()`
// > "When called as a function, returns a string representation of the current date and time"
const date = new Date()
const today = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())
const today = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 12)
const {getByText, getByTitle} = render(component)
const dayDisplay = getByText('Empty')

View File

@ -97,6 +97,7 @@ function DateRange(props: PropertyProps): JSX.Element {
const handleDayClick = (day: Date) => {
const range: DateProperty = {}
day.setHours(12)
if (isRange) {
const newRange = DateUtils.addDayToRange(day, {from: dateFrom, to: dateTo})
range.from = newRange.from?.getTime()