I am using the Jquery date picker. I have a page where the user can enter a date. I want to make sure when they enter a date it will show up __/__/____ when they type it in. I have 3 date pickers on the page I want to mask. All 3 are the same lay out.
I have a question. I have an Autocomplete the is shwing a list of Active people. Is there a way to only show Active people but if they type a name of an Inactive person the name will show in the input box but not in the dropdown list?
My boss asked me today if the active people will show up on the dropdown but be able to type an inactive person and have then show up.
I do have a way set up that if not valid i call a JS function up to check the non valid people. This worded but for this page I am getting 3 different types of people from 3 different sources.
I tried checking to see if the person was inactive make the option not visible but in the autocomplete it showes them.
I am using an Autocomplete for a filter. I have a clear link when clicked it will clear out the filter fields. In my clear Javascript function I am unable to clear out the text of the autocomplete input in javascript. I searched for a while and I am not able to find a way to clear out the text.
I have a question. I have an edit page with an autocomplete. What I am trying to figure out is when the page loads I want to check and see if the value from the DB matches the combobox value the have that value selected. I have coded the html but when the autocomplete get created on the page it is not showing the selected value. Is there a way to do it.
This is what I have for the auto complete
<script>
(function( $ ) {
$.widget( "ui.combobox", {
_create: function() {
var input,
self = this,
select = this.element.hide(),
selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : "",
wrapper = this.wrapper = $( "<span>" )
.addClass( "ui-combobox" )
.insertAfter( select );
input = $( "<input>" )
.appendTo( wrapper )
.val( value )
.addClass( "ui-state-default ui-combobox-input" )
.autocomplete({
delay: 0,
minLength: 0,
source: function( request, response ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
// needed to reset the hidden new vendor fields to not new so if user selects new and later selects a vendor in the list these values will clear out and be reset if vendor is going to be new.
document.getElementById("ifNewVendor").value=0;// this resets the new vendor to 0
document.getElementById("ifNewAddress").value=0;// reserts the new address to 0
document.getElementById("newVendorName").value="";// clears out the name of the new vendor
self._trigger( "selected", event, {
item: ui.item.option
});
},
change: function( event, ui ) {
if ( !ui.item ) {
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
valid = false;
select.children( "option" ).each(function() {
if ( $( this ).text().match( matcher ) ) {
this.selected = valid = true;
return false;
}
});
if ( !valid ) {
document.getElementById("ifNewVendor").value=1;// to show if new vendor
document.getElementById("newVendorName").value=$(this).val(); // enter the name of the vendor so I can save the name. I was not able to get the name in JS until I did this.
getVendor();// calls get vendor to update the address.
I am using the daterange picker. On the page I have a Spry Tab Bar on one of the tabs I have the daterange picker. If the user clicks on a link that shows the tab with the datepicker on, everything works. If the user clicks a link that shows a different tab, the tab with the date picker is hidden. Then If the user clicks on the tab with the picker then clicks on the text box for the picker popup to show the pop up it is not showing under the textbox. Sometimes it is at the bottom left of the page and sometimes it is the top left of the page. I have spent a couple of hours trying to figure this out and I am unable to get the pop up to show correctly.