BUG: Use datepicker in collection form (#81)

Fixes #73
This commit is contained in:
Matthew Ryan Dillon 2018-03-13 07:59:49 -07:00 committed by GitHub
parent 2ead72c552
commit ab30692021
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 6 deletions

View file

@ -79,19 +79,35 @@
{{/validated-field}}
{{#validated-field property='collectionStartDate' label='Collection start date' changeset=changeset}}
{{input value=changeset.collectionStartDate type='date' class='form-control'}}
{{
pikaday-input
onSelection=(action (mut changeset.collectionStartDate))
value=changeset.collectionStartDate
useUTC=true
placeholder='MM/DD/YYYY'
format='MM/DD/YYYY'
class='form-control'
}}
{{/validated-field}}
{{#validated-field property='collectionStartTime' label='Collection start time' changeset=changeset}}
{{input value=changeset.collectionStartTime type='time' class='form-control'}}
{{input value=changeset.collectionStartTime type='time' class='form-control' placeholder='HH:MM:SS (24 hour)'}}
{{/validated-field}}
{{#validated-field property='collectionEndDate' label='Collection end date' changeset=changeset}}
{{input value=changeset.collectionEndDate type='date' class='form-control'}}
{{
pikaday-input
onSelection=(action (mut changeset.collectionEndDate))
value=changeset.collectionEndDate
useUTC=true
placeholder='MM/DD/YYYY'
format='MM/DD/YYYY'
class='form-control'
}}
{{/validated-field}}
{{#validated-field property='collectionEndTime' label='Collection end time' changeset=changeset}}
{{input value=changeset.collectionEndTime type='time' class='form-control'}}
{{input value=changeset.collectionEndTime type='time' class='form-control' placeholder='HH:MM:SS (24 hour)'}}
{{/validated-field}}
{{/with}}
{{/f.content}}