MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / _fill_lightbox_select

Function _fill_lightbox_select

codebase/sources/dhtmlxscheduler.es.js:6637–6658  ·  view source on GitHub ↗
(s2, i2, d)

Source from the content-addressed store, hash-verified

6635 }
6636 }
6637 function _fill_lightbox_select(s2, i2, d) {
6638 var time_values = config._time_values;
6639 var direct_value = d.getHours() * 60 + d.getMinutes();
6640 var fixed_value = direct_value;
6641 var value_found = false;
6642 for (var k = 0; k < time_values.length; k++) {
6643 var t_v = time_values[k];
6644 if (t_v === direct_value) {
6645 value_found = true;
6646 break;
6647 }
6648 if (t_v < direct_value)
6649 fixed_value = t_v;
6650 }
6651 s2[i2 + map[0]].value = value_found ? direct_value : fixed_value;
6652 if (!(value_found || fixed_value)) {
6653 s2[i2 + map[0]].selectedIndex = -1;
6654 }
6655 s2[i2 + map[1]].value = d.getDate();
6656 s2[i2 + map[2]].value = d.getMonth();
6657 s2[i2 + map[3]].value = d.getFullYear();
6658 }
6659 _fill_lightbox_select(s, 0, ev.start_date);
6660 _fill_lightbox_select(s, 4, ev.end_date);
6661 }, get_value: function(node, ev, config) {

Callers 2

extend$6Function · 0.70
_update_lightbox_selectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected