mirror of
https://github.com/status-im/fathom.git
synced 2025-02-28 19:10:36 +00:00
use UTC times in client-side datepicker
This commit is contained in:
parent
840956bfbd
commit
b5d5996c90
@ -40,8 +40,12 @@ class DatePicker extends Component {
|
||||
@bind
|
||||
setTimeRange(period) {
|
||||
let beforeDate = new Date();
|
||||
beforeDate.setUTCHours(24);
|
||||
beforeDate.setMinutes(0);
|
||||
|
||||
let afterDate = new Date();
|
||||
afterDate.setHours(0, 0, 0, 0);
|
||||
afterDate.setUTCHours(0);
|
||||
afterDate.setMinutes(0);
|
||||
switch(period) {
|
||||
case "week":
|
||||
afterDate.setDate(afterDate.getDate() - (afterDate.getDay() + 6) % 7);
|
||||
|
Loading…
x
Reference in New Issue
Block a user