4 include_once
'Services/Table/interfaces/interface.ilTableFilterItem.php';
35 parent::__construct($a_title, $a_postvar);
47 $this->toggle_fulltime_txt = $a_title;
48 $this->toggle_fulltime_checked = $a_checked;
49 $this->toggle_fulltime =
true;
74 $this->start = $a_date;
84 $this->start_text = $a_txt;
103 $this->end_text = $a_txt;
138 $this->end = $a_date;
158 $this->showtime = $a_showtime;
187 $this->startyear = $a_year;
210 $this->minute_step_size = $a_step_size;
232 if(is_array($incoming))
241 $item->setValueByArray($a_values);
269 $format = $post[
'tgl']
277 $valid_start =
false;
312 $valid_start =
false;
321 $valid = ($valid_start && $valid_end);
333 $this->invalid_input_start =
$start;
334 $this->invalid_input_end =
$end;
339 $this->
setAlert($lng->txt(
"form_msg_wrong_date"));
347 $post_format = $format
401 $tpl =
new ilTemplate(
"tpl.prop_datetime_duration.html",
true,
true,
"Services/Form");
407 $toggle_id = md5($this->
getPostVar().
'_fulltime');
409 $tpl->setCurrentBlock(
'toggle_fullday');
411 $tpl->setVariable(
'FULLDAY_TOGGLE_ID', $toggle_id);
412 $tpl->setVariable(
'FULLDAY_TOGGLE_CHECKED', $this->toggle_fulltime_checked ?
'checked="checked"' :
'');
413 $tpl->setVariable(
'FULLDAY_TOGGLE_DISABLED', $this->
getDisabled() ?
'disabled="disabled"' :
'');
414 $tpl->setVariable(
'TXT_TOGGLE_FULLDAY', $this->toggle_fulltime_txt);
415 $tpl->parseCurrentBlock();
422 $picker_start_id = md5($this->
getPostVar().
'_start');
423 $picker_end_id = md5($this->
getPostVar().
'_end');
425 $tpl->setVariable(
'DATEPICKER_START_ID', $picker_start_id);
426 $tpl->setVariable(
'DATEPICKER_END_ID', $picker_end_id);
440 $tpl->setVariable(
'DATEPICKER_START_DISABLED',
'disabled="disabled" ');
441 $tpl->setVariable(
'DATEPICKER_END_DISABLED',
'disabled="disabled" ');
445 if($start_txt === null)
447 $start_txt = $lng->txt(
"form_date_duration_start");
451 $tpl->setVariable(
'START_LABEL', $start_txt);
452 $tpl->touchBlock(
'start_width_bl');
456 if($end_txt === null)
458 $end_txt = $lng->txt(
"form_date_duration_end");
462 $tpl->setVariable(
'END_LABEL', $end_txt);
463 $tpl->touchBlock(
'end_width_bl');
467 $tpl->setVariable(
'DATE_START_ID', $this->
getPostVar().
'[start]');
473 $tpl->setVariable(
'START_PLACEHOLDER', $pl_format);
474 $tpl->setVariable(
'END_PLACEHOLDER', $pl_format);
479 $date_value = htmlspecialchars($this->invalid_input_start);
486 $tpl->setVariable(
'DATEPICKER_START_VALUE', $date_value);
488 $date_value = htmlspecialchars($this->invalid_input_end);
495 $tpl->setVariable(
'DATEPICKER_END_VALUE', $date_value);
499 $tpl->setVariable(
"START_REQUIRED",
"required=\"required\"");
500 $tpl->setVariable(
"END_REQUIRED",
"required=\"required\"");
515 $a_tpl->setCurrentBlock(
"prop_generic");
516 $a_tpl->setVariable(
"PROP_GENERIC",
$html);
517 $a_tpl->parseCurrentBlock();
558 if($this->invalid_input_start ||
559 $this->invalid_input_end)
Interface for property form input GUI classes that can be used in table filters.
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static getUserDateFormat($a_add_time=false, $a_for_parsing=false)
Parse current user setting into date/time format.
static addDateTimePicker($a_id, $a_add_time=null, array $a_custom_config=null, $a_id2=null, $a_custom_config2=null, $a_toggle_id=null, $a_subform_id=null)
Add date time picker to element.
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
static parseIncomingDate($a_value, $a_add_time=null)
Try to parse incoming value to date object.