mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 11:02:46 +08:00
FIX: CalendarDateTimeInput
renders the wrong day (#27639)
This commit is contained in:
parent
e161086630
commit
0b3b101c97
|
@ -40,7 +40,8 @@ export default class CalendarDateTimeInput extends Component {
|
|||
if (moment(this.args.date, this._dateFormat).isValid()) {
|
||||
this._date = this.args.date;
|
||||
this._picker.setDate(
|
||||
moment.utc(this._date).format(this._dateFormat),
|
||||
// using the format YYYY-MM-DD returns the previous day for some timezones
|
||||
moment.utc(this._date).format("YYYY/MM/DD"),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user