This is my Jquery Script Code.
<script type="text/javascript">
var months = ['01 - January', '02 - February', '03 - March', '04 - April', '05 - May', '06 - June', '07 - July', '08 - August', '09 - September', '10 - October', '11 - November', '12 - December'];
$().ready(function() {
$("#month").autocomplete(months,{minChars: 0,max: 12,autoFill: true,mustMatch: true,matchContains: false,scrollHeight: 220,
formatItem: function(data, i, total)
{
// don't show the current month in the list of values (for whatever reason)
if ( data[0] == months[new Date().getMonth()] )
return false;
return data[0];
}
});
$("#clear").click(function() {
$(":input").unautocomplete();
});
});
</script>
</head>
<body>
<div id="content">
<form autocomplete="off">
<p>
<label>Single Month:</label>
<input type="text" id="month" />
</p>
<input type="submit" value="Submit" />
</form>
</div>
</body>
Now I'm Entering a key '01' It Picks only '01 - January' in tat list . If i select the option by mouse clicking or Typing Enter key, the it will show in the text box. But i need to show only month code in the input filed. In list box only i should show the month code with the month description. I don't want to show the month description in the input box. And another one I need to show arrow button to show the list. How can i do this ?