Skip to content

Commit

Permalink
On the GHD instance, set the default datetime picker to the GHD month. (
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeburg authored Jul 18, 2024
1 parent c608747 commit 07ce60a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/components/datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import {action} from '@ember/object';
import focusElement from "clubhouse/utils/focus-element";
import tempusdominus from '@eonasdan/tempus-dominus';
import {later} from '@ember/runloop';
import { service } from '@ember/service';
import {setting} from "clubhouse/utils/setting";

export default class DatetimePickerComponent extends Component {
@service session;

constructor() {
super(...arguments);
let {dateOnly, minDate, maxDate, viewDate, defaultDate} = this.args;
Expand Down Expand Up @@ -46,6 +50,8 @@ export default class DatetimePickerComponent extends Component {

if (viewDate) {
this.config.viewDate = new Date(viewDate);
} else if (this.session.isGroundhogDayServer) {
this.config.viewDate = new Date(setting('GroundhogDayTime'));
}

if (defaultDate) {
Expand Down

0 comments on commit 07ce60a

Please sign in to comment.