{* Smarty *}

{literal}
<script type="text/javascript">
//<![CDATA[
$(function(){
  $.datepicker.setDefaults($.datepicker.regional['ru']);
  var VarYearE = (new Date).getFullYear()+1;
  $("#svtmove_date_b").datepicker($.extend({yearRange: '1970:'+VarYearE, dateFormat: "dd.mm.yy", changeMonth: true, changeYear: true, closeText: 'X', showButtonPanel: true, showStatus: true,showOn: 'both', buttonText: 'Выбрать дату', buttonImageOnly: true, buttonImage: '{/literal}{$MS_SP->Sp_PathTop}{$MS_SP->Sp_PathToSmarty}/{$MS_SP->Sp_TemplateName}/css/images/ms_check_calendar.png{literal}'}));
  $("#svtmove_date_e").datepicker($.extend({yearRange: '1970:'+VarYearE, dateFormat: "dd.mm.yy", changeMonth: true, changeYear: true, closeText: 'X', showButtonPanel: true, showStatus: true,showOn: 'both', buttonText: 'Выбрать дату', buttonImageOnly: true, buttonImage: '{/literal}{$MS_SP->Sp_PathTop}{$MS_SP->Sp_PathToSmarty}/{$MS_SP->Sp_TemplateName}/css/images/ms_check_calendar.png{literal}'}));
  $("#svtmove_date_b").datepicker( "setDate", '-3m');
  $("#svtmove_date_e").datepicker( "setDate", '0d');
});

$(function(){
  $("#DateForm").submit(function() {
    var param = GetParamForGrid($(this).serialize());
    $('#GridSvtMove').setGridParam({postData: param});
    $("#GridSvtMove").trigger("reloadGrid");
    return false;
  });
});
//]]>
</script>
{/literal}

<form id="DateForm" name="DateForm" action="" method="get">
<table>
  <tr>
    <td><span>Дата с:</span></td>
    <td>
  		<input type="text" id="svtmove_date_b" name="svtmove_date_b" value="" />
  		<span>по:</span>
  		<input type="text" id="svtmove_date_e" name="svtmove_date_e" value="" />
  	</td>
  </tr>
  <tr>
    <td colspan="2" class="MsFormSubmit"><input class="AltButtons" name="FormSubmit" value="искать" type="submit" /></td>
  </tr>
</table>
</form>