1
I’m having a lot of trouble doing this kind of formatting in the field, if anyone can help me I’ll be very grateful, well, I have a form field:
<div class="form-group col-md-12 col-sm-12 col-xs-12">
<div class="col-md-2 col-sm-2 col-xs-2 form-label">
{{Form::label('data', 'Data')}}
</div>
<div class="col-md-10 col-sm-10 col-xs-10">
{{Form::date('data', null, ['class' => 'form-control'])}}
</div>
</div>
The intention is to make this field in the following formatting, when the person type 2 numbers the field automatically puts a bar so successively forming exactly the type date, however it has a detail, the field allows the person to use the Backspace key to erase any character, thus not disturbing the field of the correct format.
Could someone help me in this role please? At least give me an idea already helps me a lot, I’m totally lost and do not know where to start ! Grateful from now on.
An easy way is to use
<input type= "date">
. Other ways is using some pluginjQuery
, for example https://plugins.jquery.com/mask/– Pedro Camara Junior
Thank you for being willing to help dear friend, however the format is already in date and is not very recommended because it is not supported by all browsers, as quoted by the friend below.
– Lincoln Binda
I recommend using a plugin https://igorescobar.github.io/jQuery-Mask-Plugin/ Input date are not supported by all browsers ( http://caniuse.com/#search=date )
– Gabriel Gonçalves