decide.nolog.cz/app/components/create-options-dates.hbs
Jeldrik Hanschke 857f2baa16
simplify form validation and drop ember-cp-validations (#631)
* replace ember-cp-validations with custom validation logic for poll creation

* refactor poll participation to not use ember-cp-validations

* drop ember-cp-validations from create.settings route

* remove unused leftovers from ember-cp-validations

* fix potential leak

* assertion thrown in CI tests (Firefox) indicate that listener is cleaned up automatically

* synchronize translations
2023-10-15 15:27:02 +02:00

41 lines
No EOL
1.2 KiB
Handlebars

{{#let @form as |form|}}
<form.element
@label={{t "create.options.dates.label"}}
@property="options"
data-test-form-element-for="days"
as |el|
>
<div
class="form-control cr-h-auto cr-pr-validation
{{if (eq el.validation 'error') 'is-invalid'}}
{{if (eq el.validation 'success') 'is-valid'}}
"
id={{el.id}}
>
<div class="row">
<div class="col-12 col-md-6">
<InlineDatepicker
@center={{this.calendarCenter}}
@selectedDays={{this.selectedDays}}
@onCenterChange={{action
(mut this.calendarCenter)
value="datetime"
}}
@onSelect={{this.handleSelectedDaysChange}}
/>
</div>
<div class="col-md-6 cr-hide-on-mobile">
<InlineDatepicker
@center={{this.calendarCenterNext}}
@selectedDays={{this.selectedDays}}
@onCenterChange={{action
(mut this.calendarCenter)
value="datetime"
}}
@onSelect={{this.handleSelectedDaysChange}}
/>
</div>
</div>
</div>
</form.element>
{{/let}}