Skip to content
This repository was archived by the owner on Aug 14, 2018. It is now read-only.

Commit f8c7ff6

Browse files
committed
Validate activity dates are between 2015 and the current date
1 parent a89db3b commit f8c7ff6

File tree

2 files changed

+145
-128
lines changed

2 files changed

+145
-128
lines changed

src/experts-activities/experts-activity-create.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ <h2>
191191
type = "date"
192192
label = "Which date did this activity take place?"
193193
value = "{{ activity.date }}"
194+
max = "{{_currentDate}}"
195+
min = "2015-01-01"
194196
required auto-validate error-message="Please enter a date for this activity.">
195197
</paper-input>
196198
<paper-input
@@ -469,6 +471,12 @@ <h2>
469471
type: Boolean,
470472
value: false
471473
},
474+
_currentDate : {
475+
type: String,
476+
value : function() {
477+
return new Date().toISOString().slice(0,10);
478+
}
479+
},
472480
},
473481
behaviors : [
474482
Polymer.PaperDialogBehavior, ActivityLinks

0 commit comments

Comments
 (0)