discourse/app/assets/javascripts/admin/addon/components/modal/custom-date-range.js
David Taylor 48193767bf DEV: Sort imports
Automatically generated by `eslint --fix` to satisfy the updated configuration
2023-10-10 21:46:54 +01:00

21 lines
526 B
JavaScript

import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
export default class CustomDateRange extends Component {
@tracked startDate = this.args.model.startDate;
@tracked endDate = this.args.model.endDate;
@action
onChangeDateRange(range) {
this.startDate = range.from;
this.endDate = range.to;
}
@action
updateDateRange() {
this.args.model.setCustomDateRange(this.startDate, this.endDate);
this.args.closeModal();
}
}