Skip to content

Commit

Permalink
Add min and max attributes to date input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma Leigh committed Dec 1, 2014
1 parent bdb6d8a commit 7ae9ca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions views/examples/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ <h1 class="form-title heading-large">

<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input class="form-control" id="dob-day" type="number" pattern="[0-9]*">
<input class="form-control" id="dob-day" type="number" pattern="[0-9]*" min="0" max="31">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input class="form-control" id="dob-month" type="number" pattern="[0-9]*">
<input class="form-control" id="dob-month" type="number" pattern="[0-9]*" min="0" max="12">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input class="form-control" id="dob-year" type="number" pattern="[0-9]*">
<input class="form-control" id="dob-year" type="number" pattern="[0-9]*" min="0" max="2014">
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions views/patterns/form_date.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ <h1 class="heading-xlarge">Form date test page</h1>

<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input type="text" class="form-control" id="dob-day">
<input class="form-control" id="dob-day" type="number" pattern="[0-9]*" min="0" max="31">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input type="text" class="form-control" id="dob-month">
<input class="form-control" id="dob-month" type="number" pattern="[0-9]*" min="0" max="12">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input type="text" class="form-control" id="dob-year">
<input class="form-control" id="dob-year" type="number" pattern="[0-9]*" min="0" max="2014">
</div>
</div>

Expand Down

0 comments on commit 7ae9ca1

Please sign in to comment.