jquery-weekdays
A jquery plugin to create week day's options
Usage
Simple
$('#weekdays').weekdays();
Simple starting with pre-selected values
$('#weekdays').weekdays({ selectedIndexes: [0, 2, 4, 6] });
Custom
$('#weekdaysCustom').weekdays({ days: [ "Domingo" ,"Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"] , singleSelect : true });
Parameters
- listClass: CSS Class used on UL element;
- itemClass: CSS Class used on each LI element;
- itemSelectedClass: CSS Class used on each LI element selected;
- itemSelectedClass: CSS Class used on each LI element selected;
- singleSelect: change to single select mode, only one option can be choosed;
- selectedIndexes : list of indexes selected elements;
Methods
- selectedIndexes : returns a list of indexes selected elements;
$('#weekdays').selectedIndexes() // returns ["0", "1"]
- selectedDays : returns a list of selected days
$('#weekdays').selectedDays() // returns ["Sun", "Mon"]