Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's a hack (updated with entire .html file):</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css"&gt; &lt;script type="text/javascript"&gt; $(function() { $('.date-picker').datepicker( { changeMonth: true, changeYear: true, showButtonPanel: true, dateFormat: 'MM yy', onClose: function(dateText, inst) { $(this).datepicker('setDate', new Date(inst.selectedYear, inst.selectedMonth, 1)); } }); }); &lt;/script&gt; &lt;style&gt; .ui-datepicker-calendar { display: none; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;label for="startDate"&gt;Date :&lt;/label&gt; &lt;input name="startDate" id="startDate" class="date-picker" /&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>EDIT</strong> jsfiddle for the above example: <a href="http://jsfiddle.net/DBpJe/7755/" rel="noreferrer">http://jsfiddle.net/DBpJe/7755/</a></p> <p><strong>EDIT 2</strong> Adds the month year value to input box only on clicking of Done button. Also allows to delete input box values, which isn't possible in above field <a href="http://jsfiddle.net/DBpJe/5103/" rel="noreferrer">http://jsfiddle.net/DBpJe/5103/</a></p> <p><strong>EDIT 3</strong> updated Better Solution based on rexwolf's solution down.<br> <a href="http://jsfiddle.net/DBpJe/5106" rel="noreferrer">http://jsfiddle.net/DBpJe/5106</a> </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload