Bitrix Site Manager

CalendarPeriod

string
CalendarPeriod(
 string field_from_name,
 string field_from_value,
 string field_to_name,
 string field_to_value,
 string form = "skform",
 string select_enabled = "N",
 string select_param = "class=\"typeselect\"",
 string fields_param = "class=\"typeinput\"",
 string fields_size = "10"
)

The function CalendarPeriod returns the HTML code of two input fields with icons. Icons display a standard calendar window if clicked. The first field also has a drop-down list with values from 1 to 90. If a user selects a value in the list, the first input field is set to the current date less number of days selected. Written in JavaScript.

Parameters

ParameterDescription
field_from_name Name of the field for the first date in range ("from"):
<input type="text" name="field_from_name" ... >
field_from_value Initial value of the first date in range ("from"):
<input type="text" value="field_from_value" ... >
field_to_name Name of the field for the second date in range ("till"):
<input type="text" name="field_to_name" ... >
field_to_value Initial value of the second date in range ("till"):
<input type="text" value="field_to_value" ... >
form Name of the form containing the input fields.
<form name="form">
Optional; a value of "skform" is used by default.
select_enabled If "Y", displays a list of days from 1 to 90, for quicker selection of the date.
Optional; the default value is "N" (hides the list).
select_param String with additional attributes of list of days:
<select name="field_from_name_DAYS_TO_BACK" select_param ... >
Optional; the default value is class="typeselect".
fields_param String with additional attributes of input fields:
<input type="text" fields_param ... >
Optional; the default value is class="typeinput".
fields_size Input field width:
<input type="text" size="fields_size" ... >
Optional; the default value is "10".

See Also

Example



<form action="<?=$APPLICATION->GetCurPage()?>" method="POST" name="form1">
<?echo CalendarPeriod("date_from", "25.10.2003", "date_to", "29.10.2003", "form1", "Y")?>
</form>