Skip to content

Commit

Permalink
🚨 Button Type Missing
Browse files Browse the repository at this point in the history
  • Loading branch information
nadnoslen committed Apr 18, 2022
1 parent 8530a18 commit 35c1d84
Showing 1 changed file with 139 additions and 21 deletions.
160 changes: 139 additions & 21 deletions tests/dummy/app/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@
<div class="form-group">
<label class="control-label">Type A Date</label>
<div class="input-group">
<InputDate @autofocus={{true}} @date={{demoDate}} @classNames="form-control" @displayFormat="LLLL" @enterSubmitsForm?={{false}} @placeholder="Try typing a date and then press enter." @aria-describedby="demo-date-addon" />
<InputDate
@autofocus={{true}}
@date={{demoDate}}
@classNames="form-control"
@displayFormat="LLLL"
@enterSubmitsForm?={{false}}
@placeholder="Try typing a date and then press enter."
@aria-describedby="demo-date-addon"
/>
<span class="input-group-addon" id="demo-date-addon">{{demoDateISOString}}</span>
</div>
<p class="help-block">
Expand All @@ -43,7 +51,15 @@
<div class="form-group">
<label class="control-label">Ambiguous Date In The Future</label>
<div class="input-group">
<InputDate @date={{ambiguousFuture}} @classNames="form-control" @displayFormat="LLLL" @enterSubmitsForm?={{false}} @future?={{true}} @placeholder="Try an ambiguous date like `jan` or `wed`" @aria-describedby="demo-date-addon" />
<InputDate
@date={{ambiguousFuture}}
@classNames="form-control"
@displayFormat="LLLL"
@enterSubmitsForm?={{false}}
@future?={{true}}
@placeholder="Try an ambiguous date like `jan` or `wed`"
@aria-describedby="demo-date-addon"
/>
<span class="input-group-addon" id="demo-future-addon">{{ambiguousFutureISOString}}</span>
</div>
<p class="help-block">
Expand All @@ -62,7 +78,12 @@
<legend>Initializing With A Date</legend>
<div class="form-group">
<label class="control-label">The Day NAFTA Was Signed</label>
<InputDate @classNames="form-control" @date={{model.naftaSigned}} @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Now we don't know when NAFTA was signed." />
<InputDate
@classNames="form-control"
@date={{model.naftaSigned}}
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Now we don't know when NAFTA was signed."
/>
</div>
<p class="help-block">
This example is binding the parsed date from the textbox to a controller property named
Expand All @@ -85,7 +106,15 @@
<div class="form-group">
<label class="control-label">Type A Date</label>
<div class="input-group">
<InputDate @classNames="form-control" @date={{dateWithTimezone}} @displayFormat="llll z" @enterSubmitsForm?={{false}} @timezone="Europe/Rome" @placeholder="Try typing a date and then press enter." @aria-describedby="date-addon" />
<InputDate
@classNames="form-control"
@date={{dateWithTimezone}}
@displayFormat="llll z"
@enterSubmitsForm?={{false}}
@timezone="Europe/Rome"
@placeholder="Try typing a date and then press enter."
@aria-describedby="date-addon"
/>
<span class="input-group-addon" id="date-addon">{{dateWithTimezoneISOString}}</span>
</div>
<p class="help-block">
Expand Down Expand Up @@ -117,7 +146,13 @@
</legend>
<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="LT" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="LT"
/>
<span class="input-group-addon">Time (<code>LT</code>)</span>
</div>
<p class="help-block">
Expand All @@ -139,7 +174,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="LTS" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="LTS"
/>
<span class="input-group-addon">Time with seconds (<code>LTS</code>)</span>
</div>
<div class="help-block">
Expand All @@ -154,7 +195,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="L" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="L"
/>
<span class="input-group-addon">Month numeral, day of month, year (<code>L</code>)</span>
</div>
<div class="help-block">
Expand All @@ -169,7 +216,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="l" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="l"
/>
<span class="input-group-addon">Month numeral, day of month, year (<code>l</code>)</span>
</div>
<div class="help-block">
Expand All @@ -184,7 +237,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="LL" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="LL"
/>
<span class="input-group-addon">Month name, day of month, year (<code>LL</code>)</span>
</div>
<div class="help-block">
Expand All @@ -199,7 +258,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="ll" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="ll"
/>
<span class="input-group-addon">Month name, day of month, year (<code>ll</code>)</span>
</div>
<div class="help-block">
Expand All @@ -214,7 +279,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="LLL" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="LLL"
/>
<span class="input-group-addon">Month name, day of month, year, time (<code>LLL</code>)</span>
</div>
<div class="help-block">
Expand All @@ -229,7 +300,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="lll" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="lll"
/>
<span class="input-group-addon">Month name, day of month, year, time (<code>lll</code>)</span>
</div>
<div class="help-block">
Expand All @@ -244,7 +321,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="LLLL" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="LLLL"
/>
<span class="input-group-addon">Month name, day of month, day of week, year, time (<code>LLLL</code>)</span>
</div>
<div class="help-block">
Expand All @@ -259,7 +342,13 @@

<div class="form-group">
<div class="input-group">
<InputDate @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="You cleared the date. Try entering another." @date={{model.now}} @displayFormat="llll" />
<InputDate
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="You cleared the date. Try entering another."
@date={{model.now}}
@displayFormat="llll"
/>
<span class="input-group-addon">
Month name, day of month, day of week, year, time (
<code>llll</code>
Expand All @@ -283,7 +372,12 @@
<legend>Submitting In A Form</legend>
<div class="form-group">
<label class="control-label">Type A Date...</label>
<InputDate @classNames="form-control" @displayFormat="LLLL" @placeholder="Choose a date and submit the form..." @date={{submittedDate}} />
<InputDate
@classNames="form-control"
@displayFormat="LLLL"
@placeholder="Choose a date and submit the form..."
@date={{submittedDate}}
/>
<p class="help-block">
Press
<kbd>ENTER</kbd>
Expand All @@ -296,7 +390,7 @@
</div>
</div>
<div class="form-group">
<button class="btn btn-default">Submits The Form</button>
<button class="btn btn-default" type="submit">Submits The Form</button>
</div>
</fieldset>
</form>
Expand Down Expand Up @@ -324,7 +418,13 @@
<legend>Assigned To Query Param</legend>
<div class="form-group">
<label class="control-label">Change The Date And Check The Address Bar</label>
<InputIso8601 @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="Try another date. It appears as `dateAsParam` in the page url." @iso8601={{dateAsParam}} @displayFormat="LLL Z" />
<InputIso8601
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="Try another date. It appears as `dateAsParam` in the page url."
@iso8601={{dateAsParam}}
@displayFormat="LLL Z"
/>
<div class="help-block">
{{!@formatter:off}}
<pre>// app/templates/example.hbs
Expand All @@ -337,7 +437,13 @@
</div>
<div class="form-group">
<label class="control-label">Choose Any Date And See It In The URL</label>
<InputIso8601 @classNames="form-control" @enterSubmitsForm?={{false}} @placeholder="Choose a date..." @iso8601={{wasEmptyUntilNow}} @displayFormat="LLL Z" />
<InputIso8601
@classNames="form-control"
@enterSubmitsForm?={{false}}
@placeholder="Choose a date..."
@iso8601={{wasEmptyUntilNow}}
@displayFormat="LLL Z"
/>
<div class="help-block">
{{!@formatter:off}}
<pre>// app/templates/example.hbs
Expand All @@ -355,7 +461,14 @@
<legend>Specific Timezone In Query Parameter</legend>
<div class="form-group">
<label class="control-label">Choose A Date And See It In The URL</label>
<InputIso8601 @classNames="form-control" @enterSubmitsForm?={{false}} @iso8601={{iso8601WithTimezone}} @displayFormat="llll z" @timezone="Pacific/Honolulu" @placeholder="Try typing a date and then press enter." />
<InputIso8601
@classNames="form-control"
@enterSubmitsForm?={{false}}
@iso8601={{iso8601WithTimezone}}
@displayFormat="llll z"
@timezone="Pacific/Honolulu"
@placeholder="Try typing a date and then press enter."
/>
<p class="help-block">
</p>
<div class="help-block">
Expand All @@ -371,7 +484,12 @@
<legend>Submitting In A Form</legend>
<div class="form-group">
<label class="control-label">Type A Date...</label>
<InputIso8601 @classNames="form-control" @displayFormat="LLLL" @placeholder="Choose a date and submit the form..." @iso8601={{submittedIso8601}} />
<InputIso8601
@classNames="form-control"
@displayFormat="LLLL"
@placeholder="Choose a date and submit the form..."
@iso8601={{submittedIso8601}}
/>
<p class="help-block">
Press
<kbd>ENTER</kbd>
Expand All @@ -386,7 +504,7 @@
</div>
</div>
<div class="form-group">
<button class="btn btn-default">Submits The Form</button>
<button class="btn btn-default" type="submit">Submits The Form</button>
</div>
</fieldset>
</form>
Expand Down

0 comments on commit 35c1d84

Please sign in to comment.