how to open date picker in jquery mobile (with hide keyboad) - jquery-mobile

I am using jquery mobile .I need to show date picker on clicking the text field,along with i need to hide keyboad on clicking the date text field. As a default functionality keyboard is open when user click textfield keyboard is open but i need to only open date picker on clicking the text field..Here is code.
<div data-role="fieldcontain">
<label for="text-12" style="text-align:left;margin-left: 0px;" >Date:</label>
<input name="text-12" id="documentCaseDate" value="" type="text">
</div>

If required to have a Datepicker in jquery mobile why not have a use of Jquery Mobile Datebox...
It is a Date UI for jquery mobile framework, has got of other features like...
Multiple Data-Entry Modes
4 Different display modes
Fully localized
Supports data-limiting of input
Automatically parses hand-entered or pre-entered dates on open
Auto-bind's to data-type='datebox', options are configurable via data-options.
Full Plugin can be download from Jquery Mobile Datebox and homepage could be refered as Jquery Mobile Datebox Homepage....
Thanks...

Related

JQuery Mobile themeroller checkbox in List

I'm using the theme provided by themeRoller in my personal mobile web application.
The issue I'm facing is when I use checkbox in <li> clause.
Probably, if we want to use themeRoller checkbox we write it like:
<label><input type="checkbox" />checkbox</label>
Above example displays the checkbox as I want but when I use the same code in <li> it doesn't keep the same.

How to add datepicker in MVC without jQuery

How to add datepicker in MVC without jQuery
There's no built in Datepicker in MVC. The nearest to a built-in datepicker would be the HTML 5 datetime input type
<input type="datetime " value="" />
which may show a datepicker in certain browsers, but this may not be supported across all your target browsers and is limited to how you can style it.
In light of this, you may want to look at a JavaScript based datepicker.
I don't think you can no, although when running in Chrome it will allow you to pick dates using a datepicker

type="search" works on PC but not Iphone?

Hello Stackoverflow people,
Background:
I am building a privacy search engine at motherpipe.co.uk. I am adding functionality to the search box that allows a user to erase the text they have written with one click on the X to the right side in the searchbox. This is done by adding HTML5 functionality type="search".
Problem:
The code works on PC but not on Iphone and Ipad. The X does not show up. See https://motherpipe.co.uk/mobile/.
Question:
What do I need to change to get the X to appear and work correctly in Safari on iOS?
Any help much appreciated. Current HTML:
<form name="searchform" id="theform" action="search.php" method="GET" />
<input type="search" id="tag" class="textbox" name="q" autocomplete="off"/>
There doesn't appear to be anything in the HTML5 spec that requires the field-clear button. It is a feature that some browsers have added, but is not required. From the HTML5 spec -
The difference between the Text state and the Search state is primarily stylistic: on platforms where search fields are distinguished from regular text fields, the Search state might result in an appearance consistent with the platform's search fields rather than appearing like a regular text field.
So, it isn't that the search field doesn't "work" - it will collect text and submit it to your server, its just that it has a different appearance between browsers.
In a quick test, Safari and Chrome on OSX added the "x" while Firefox did not, but all browsers submitted the data.

Mobile Safari auto focus on text input

I would like to focus on a text input field immediately on page load. However the following code, that works on desktop browsers, doesn't work on mobile Safari (on iOS 6).:
<input type="text" name="q" class="search" id="focusme" />
...
<script type="text/javascript">
window.onload=function(){var a=document.getElementById("focusme");a.focus();}
</script>
I have tried to implement several suggested fixes for this. However I haven't been able to get it working. It does display the CSS changes to the field when it is in focus, however the keyboard is not brought up.
I suspect this may be due to my currently very limited understanding of JavaScript, but I think it may still be a bug in Safari.
The question:
In Safari on iOS 6, Do you know of any way to auto focus on a text input field on page load?
Thank you for your help :-)
Update:
The page does have jquery and mobile-jquery available, if they need to be used.
Why using JavaScript? <input type="text" autofocus /> should do it!

No event on left click for button in jQueryMobile app

i am building an mobile application for sfdc.
i am using apex and visual force and jquery mobile js to create my app.
i have used apex:command button and apex:commandlink.
but when i click those buttons the event is not generated , whereas when i right click on the button the button functions as required
<apex:commandLink value="Save" action="{!HRSave}"/>
<!--<apex:commandbutton value="Save" style="font-style:italic" action="{!HRSave}"/>-->
Is commandLink working but commandButton not working?
You might try either passing it via JavaScript to an actionFunction component or look into JavaScript Remoting. Remoting is excellent with jQuery.

Resources