mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
Fix today (#4531)
* 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:
parent
cc9a689c8b
commit
759a8bb76a
@ -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')
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user