html-input

How can I compare date/time values using the jQueryUI datepicker and HTML5 time input?

和自甴很熟 提交于 2019-12-02 01:30:18
I want to validate that the "begin" date/time pair predates the "end" date/time pair on a page. I'm using the jQueryUI datepicker, and the HTML5 time input element/widget. This jQuery: var begD = $.datepicker.parseDate('mm/dd/yy', $('#BeginDate').val()); var endD = $.datepicker.parseDate('mm/dd/yy', $('#EndDate').val()); if (begD > endD) { alert('Begin date must be before End date'); $('#BeginDate').focus(); return false; } (see this script in context here: http://jsfiddle.net/clayshannon/QCrXG/9/ ) ...works for comparing the datepicker vals, but I need to incorporate the time elements too, so

How to manually rerun formatter chain in angularjs directive with ngModel?

北城余情 提交于 2019-12-01 19:32:20
Angular.js ngModel has the ability to declare a chain of parsers and formatters . Some more details can be found at the great answer to 'How to do two-way filtering in angular.js?' now the formatter chain only will be run if the ngModel will update. so if you have a second input-parameter that affects the viewValue (is used in one of the formatters) this will not trigger an update of the View. similar as far as i found ngModel only uses a simple $watch - so if your model is a collection/object it will not trigger if sub-elements are changed. What is the best way to implement a deep watch for

In MS Edge, placeholder text doesn't disappear after entering text in input type=“number”

断了今生、忘了曾经 提交于 2019-12-01 19:31:10
To see the issue try this Snippet: <div> <span>A number input:</span> <input type="number" placeholder="Enter some TEXT"> </div> <div> <span>A text input:</span> <input type="text" placeholder="Enter some text"> </div> The behavior of input type="number" in: Chrome : Unable to input text. When numbers are input, placeholder text disappears as expected. Internet Explorer : Able to input text, but when text or numbers are input, placeholder text disappears as expected. Edge : Able to input text, and when text is input, placeholder text does not disappear! What?! Is this really just a crazy bug

Have a file input form upload when a user clicks “open”

百般思念 提交于 2019-12-01 13:50:57
I am wondering if this flow is possible: Click a button that says "Upload". It is styled very differently from the usual . It does not show the "No file selected" text. The usual file browser pops open. The user chooses a file to upload. They click the "open" button in the file browser. Upon clicking "open", the file browser is closed (like normal) and the file immediately begins uploading (unlike normal where it requires a submit). I detect when the file is finished uploading, and direct to another page. Here is how I would try to implement it: Custom CSS on input button - this doesn't seem

How-To Upload Photos to facebook(graph api) with html file selector(input type=“file”)

故事扮演 提交于 2019-12-01 09:19:40
I have a html file which select images from user's computer.code is given bellow <html> <body> <form enctype="multipart/form-data" action="http://localhost/uploader/upload.php" method="POST"> Please choose a photo: <input name="source" type="file"><br/><br/> Say something about this photo: <input name="message" type="text" value=""><br/><br/> <input type="submit" value="Upload"/><br/> </form> </body> </html> When I press upload button,I need to pass the real path of the selected image into upload.php file.code of the upload.php is given bellow <?php include_once 'fbmain.php'; //some codes try{

Html Color only (*) symbol in input placeholder field in form

允我心安 提交于 2019-12-01 04:23:50
I have the following code: <input id="firstName" name="fname" type="text" maxlength="50" placeholder="First Name *" required> How can I color the (*) symbol in the placeholder value red without coloring the other text with it (being First Name text)? Any help is much appreciated! Thank you! Al Unfortunately, it isn't possible to change the color of certain text in a input :( you can try to use a contenteditable div: <div class="input" contenteditable>First Name <span style="color:red;">*</span></div> Then, you have to add and remove the placeholder with JS: $(function(){ $('.input').focus

Html Color only (*) symbol in input placeholder field in form

◇◆丶佛笑我妖孽 提交于 2019-12-01 03:03:02
问题 I have the following code: <input id="firstName" name="fname" type="text" maxlength="50" placeholder="First Name *" required> How can I color the (*) symbol in the placeholder value red without coloring the other text with it (being First Name text)? Any help is much appreciated! Thank you! Al 回答1: Unfortunately, it isn't possible to change the color of certain text in a input :( you can try to use a contenteditable div: <div class="input" contenteditable>First Name <span style="color:red;">*

How to fill up form using CasperJS without form tag

拥有回忆 提交于 2019-11-30 19:57:24
I'm new to CasperJS and I'm having problems in logging in into this site http://weibo.com/login.php here's what I've tried this.fill('form#contact-form', { 'username': 'test@test.com', 'password': 'anypassword', }, true); I can't used that since it has no form. so I tried a different method using sendKeys. this.sendKeys('.W_input ', 'tinkerbell@gmail.com'); Now my problem in here is that the input text has no ID in it, only a CLASS and both username and password have the same CLASS in it. how can i type into that textbox using only that class? or is it possible to use sendKeys using XPath?

Is it possible to run some HTML5 input types in IE8?

≯℡__Kan透↙ 提交于 2019-11-30 19:17:53
Is it possible to run some HTML5 input types in IE8 with any library?? for example with range. Points: <input type="range" name="points" min="1" max="10"> <input type="submit" value="send"> You can use modernizr To check if your browser supports HTML5. And you could use Jquery UI Slider it work in IE8 Check this page : http://jqueryui.com/slider/ demo: http://jsbin.com/eduren/1/edit To read slider value/percentage value: var val = $('#slider').slider("option", "value"); IE8 doesn't support <input type="range"> . The most seamless way to accomplish this in older browsers is to detect support

Making up down arrow of HTML's input number much bigger and cleaner

风流意气都作罢 提交于 2019-11-30 18:24:54
Rather than Is it possible to always show up/down arrows for input "number"? , I want to be able to make up/down arrow much bigger and cleaner. What I have right now: I need to make them bigger like this: you can wrap a input in and element and style it div { display: inline-block; position: Relative; border: 2px solid grey; border-radius: 10px; overflow: hidden; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } div:before, div:after { background: white; right: 0px; width: 30px; height: 20%;