Documentation

CalendarDate

string
CalendarDate(
 string FromName,
 string FromVal,
 string FormName = "skform",
 string size = "10",
 string param = "class=\"typeinput\""
);

The function returns HTML code of the icon that displays a standard calendar window if clicked. The date selected is then pasted in the specified form field. Written in JavaScript.

Function parameters

ParameterDescription Available from version
FromName Input field name:
<input type="text" name="field_name" ... >
FromVal Input field initial value:
<input type="text" value="field_value" ... >
FormName Name of the form containing the date input field:
<form name="form">
Optional parameter, "skform" value by default.
size Input field width:
<input type="text" size="field_size" ... >
Optional parameter, the default value is "10".
param Input field additional attributes string:
<input type="text" field_param ... >
Optional parameter, the default value is class="typeinput".

See Also

Examples of use

<form action="<?=$APPLICATION->GetCurPage()?>" method="POST" name="form1">
<?echo CalendarDate("birthdate", "25.11.1975", "form1", "15", "class=\"my_input\"")?>
</form>


© «Bitrix24», 2001-2024
Up