I want to try to implement a gradually hidden placeholder on my following datepicker:
<b-input-group class="input-datepicker">
<b-input-group-prepend>
<b-datepicker
v-model="datepicker"
button-only
locale="en-US"
></b-datepicker>
</b-input-group-prepend>
<b-input
v-model="datepicker"
type="text"
placeholder="YYYY-MM-DD"
autocomplete="off"
class="mr-0"
></b-input>
</b-input-group>
I use Vuejs with bootstrap-vue and my date Format is YYYY-MM-DD
I wish to have, for example, on input field at beginning ____-__-__ and we gradually input data, we have for example 2020-__-__ or 2020-0_-__ and reversely
I have searched in Internet and i don't find any good answers.
Sorry for my English if is not correct, i'm french
Thank you in advance
Best Regards,
Related
I am using react js for my form. currently i am loading my date to the text box. but currently its show with different format please check this
<Form.Control
type="text" disabled
size="sm"
placeholder=""
name="termDate"
onChange={handleChange}
value={values.termDate}
/>
I am setting the value using the code given below:
setFieldValue('termDate', dataObj.termDate);
when I use the above code, textbox date load as below.
I need to load this date as 2021-07-07.
How do I format this before loading it to the textbox?
Use momentjs. This oneliner will help
moment(dataObj.termDate).format("YYYY-MM-DD");
I want to create two inputs which allow you to choose the date of the creation from a given spell of time (basically, the first input is "from" and the second one is "to").
But I can't figure out a way how to do it! Has anyone done something like this? I would really appreciate your help (so far I've just come up with the basic
<vs-input color="dark" type="date" v-model="date" label="Дата создания" class="form-control" />
but it doesn't look very good and I have no idea how to add "from" and "to" buttons to it :(
Also, is there a way to add a label to a slider? I tried to add something like this
<vs-slider :min="0" max="500000" color="danger" label="Slider" v-model="slider"/>
But it doesn't work.
There is a html5 datepicker inside my website, the problem is the placeholder is default by the computer locale, but in fact my website support multi-language, e.g. English/ Japanese /etc... so I wonder how can I change the placeholder, and if it is unfeasible , then how can I hide the placeholder?
Thanks for helping
Update: html code (the datepicker is generate by a ContactForm7 plugin in wordpress, but it seems very similar to native html5 one)
<input type="date" name="date" value="" class="wpcf7-form-control wpcf7-date wpcf7-validates-as-date required" min="2015-03-18" aria-invalid="false">
You can use CSS to change the default placeholder. Check this answer https://stackoverflow.com/a/22020200/909535
i am making a form that has a date field using textfield, i want my date field to have a label format inside the textfield, here's the picture:
after clicking on the textfield the format will be erased and the hyphen will remain like this picture:
i already made the code for the label format,
here's my code:
<input type="text" name="date" value="DD_MM_YYYY" id="date" style="width:180px" onclick="if(this.value=='DD_MM_YYYY'){this.value=''}" />
</p>
My problem now is the hypen that will remain after clicking the textfield.
Anyone knows how to do that?
Thanks in advance.
I would recommend Masked Input Plugin.
http://digitalbush.com/projects/masked-input-plugin/
You can define your own type of mask by using the code:
jQuery(function($){
$("#myinput").mask("99-99-9999",{placeholder:" "});
});
Then you can define a placeholder to the input:
<input id='myinput' placeholder='dd-mm-yyyy'>
You can use the placeholder attribute.
<input placeholder=" - - " value="DD-MM-YYYY" />
You can continue to set the value to nothing when the element is focused. On blur set the value back to DD-MM-YYYY.
Note that this attribute isn't supported by all browsers.
I have a Dojo DateTextBox that per requirement will also allow a time after the date.
<input type="text" name="date1" id="date1" value="" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'dd MMM yyyy HHmm'}" required="false" />
This all works fine. What I want to know is by default dojo has text selection disabled. I can not highlight the text or put the cursor where I want it. It always displays at the end of the selection and you have to use the arrow keys to move the selection. Is there a way to make it so the datetextbox works like a text box with a calendar? Thanks
looks like a bug. please file a ticket at bugs.dojotoolkit.org and reference checkin [24131]