Is it possible to show the label birthday like the other decorators when the input field is empty?
<paper-input-decorator label="birthday">
<core-localstorage name="birthday" value="{{birthday}}"></core-localstorage>
<input name="birthday" value="{{birthday}}" is="core-input" type="date" required>
</paper-input-decorator>
In safari you see a empty field
In chrome a pre defined dd/mm/yyyy
But there is no indication of the label birthday
Related
I have this input field
<input type="datetime-local" required>
I would like the date part to be always required, but not the time part...
I tried with pattern, like
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}.*"
but it doesn't seem to work...
any idea...
Edit:
I explain better here
<form name="test" method="POST" action="/">
<input type="datetime-local" name="event_date_start" id="event_date_start"
min="2011-06-07T00:00"
max="2099-06-14T00:00" required><br>
<input type="submit"/>
What I want is to use datetime, but time must be optional.
With the above example, submit is not allowed until you insert 00 in the time field..
I want to leave that optional...
No need for pattern just use the attributes min, max and value:
<input type="datetime-local"
value="2018-06-12T19:30"
min="2018-06-07T00:00"
max="2018-06-14T00:00" required>
If you want an inputfield with date only use:
<input type="date" required>
For time is optional:
<input type="date" required> <input type="time">
This is my current code for the input field. How can I make it display a message saying that the number I've entered should not start with zero? thanks
<input type="number" min="10" max="1000" class="form-control" name="payment"
placeholder="enter payment" style="text-align:center" autofocus required/>
<br/>
For instance, typing 020 should not be accepted. Only numbers between 10 to 1000.
This should work:
<input type="text" class="form-control" name="payment"
placeholder="enter payment" style="text-align:center" autofocus required
pattern="[1-9]\d*" title="A number with no starting zeros"/>
https://jsfiddle.net/spL2par2/
try this using HTML's pattern attribute
<input type="number" class="form-control" name="payment"
placeholder="enter payment" style="text-align:center" pattern="[1-9]\d*" autofocus required/>
<br/>
I am new to use Kendo UI. I try k-input in tag for "text" and "Password" . But the style is different. how to make both look alike?
<input type="text" name="uname" class="k-input"/><br><br>
<input type="password" name="pwd" class="k-input"/><br><br>
Output of this code : here
Kendo UI uses data attributes to achieve that purpose. You can create your password field like that:
<input data-val="true" data-val-required="*" id="Password" name="Password" type="password" class="k-textbox" />
Demo here:
http://dojo.telerik.com/aZEpE
I am trying to use the following code. The one in which I used paper-input-decorator works. What can I do for the slider type?
<form is="ajax-form" action="test/x.php" method="post">
<paper-input-decorator floatingLabel label="Enter your email address*" type="text">
<input id="input3" name="email" is="core-input" required>
</paper-input-decorator>
<paper-slider pin="true" immediateValue="true" min="0" max="5" name="slider" value="2.5">Trust Score</paper-slider>
</form>
I think this should work even with a normal form
Have you watched the network requests that are sent ?
Could you submit a Plunkr ?
I'm trying to use input type="time". On my page, if I use two of them. The second one gives a validation error on any time I enter unless I leave it empty.
I've tried values like:
05:05
23:15
The result is always:
Please enter a valid value. The field is incomplete or has an invalid date
The associated HTML is
<input type="time" name="timeStart" value="13:22" class="timepick form-control" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="16:45">
<input type="text" name="dteEnd" id="dteEnd" value="16-04-2014" class="date form-control" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Data">
<input type="time" name="timeEnd" value="" class="timepick form-control" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="18:00">