A lightweight, flexible, fast jQuery autocomplete/typehead plugin which automatically suggests matching items while typing keywords in a text field
npm install saravanajd-autocomplete
`
$3
`
const country = [{Id:1,Name:'India'},{Id:2,Name:'Japan'},{Id:3,Name:'US'}];
$('.autocomplete').autocomplete({
dataSource: country,
textProperty:'Name',
valueProperty:'Id'
});
`
$3
`
$('.yearpicker').yearpicker({
// Text property of an array
textProperty: 'name',
// value propertu of an array
valueProperty: 'value',
// array
dataSource: [],
// default selected value
defaultValue: '',
// if text is not matched then default value
notMatchedValue: '',
// delay in mili seconds seach text while typing
keyboardDelay: 500,
// show no result text if result is not match
showNoResults: false,
// show matched charected in bold
markAsBold: true,
// close the dropdown on select
closeOnSelect: true,
// allow custom value
allowCustomValue: true,
// add class for selected item
selectedClass: '',
// autocomplete container class
wrapClass: ''
});
``