jquerybuilder input date

Solutions on MaxInterview for jquerybuilder input date by the best coders in the world

showing results for - "jquerybuilder input date"
Luca
30 Jul 2018
1var rules_widgets = {
2  condition: 'OR',
3  rules: [{
4    id: 'date',
5    operator: 'equal',
6    value: '1991/11/17'
7  }]
8};
9
10$('#builder-widgets').queryBuilder({
11  plugins: ['bt-tooltip-errors'],
12
13  filters: [{
14    id: 'date',
15    label: 'Datepicker',
16    type: 'date',
17    validation: {
18      format: 'YYYY/MM/DD'
19    },
20    plugin: 'datepicker',
21    plugin_config: {
22      format: 'yyyy/mm/dd',
23      todayBtn: 'linked',
24      todayHighlight: true,
25      autoclose: true
26    }
27  }],
28
29  rules: rules_widgets
30});
31
32$('#btn-reset').on('click', function() {
33  $('#builder-widgets').queryBuilder('reset');
34});
35
36$('#btn-set').on('click', function() {
37  $('#builder-widgets').queryBuilder('setRules', rules_widgets);
38});
39
40$('#btn-get').on('click', function() {
41  var result = $('#builder-widgets').queryBuilder('getRules');
42
43  if (!$.isEmptyObject(result)) {
44    alert(JSON.stringify(result, null, 2));
45  }
46}); 
47