<div style="height:40px;">
	Periode : <input type="text" id="txtperiode_awal_searchbc25" value="<?php echo date("Y-m-d") ?>" /> sampai  <input type="text" id="txtperiode_akhir_searchbc25" value="<?php echo date("Y-m-d") ?>" /> 
	<button id="btnsearchbc25" >SEARCH</button>
	<button id="btnclearsearchbc25" >CLEAR SEARCH</button>
</div>

<script type="text/javascript">
    
    $(document).ready(function(){
		var currentDate = new Date(); 
		var datesetopt = {
			showOn: "button",
			buttonImageOnly: true,
			buttonImage: "<?php echo base_url()."assets/images/icons/16x16/timespan.png"  ?>",
			buttonText: "Tanggalan",
			dateFormat: 'yy-mm-dd'
		};
		
		$("#txtperiode_awal_searchbc25").datepicker(datesetopt);
		$("#txtperiode_akhir_searchbc25").datepicker(datesetopt); 	
		
		$("#btnsearchbc25").button().click(function(){
			/* var form_data = {
				tglawal: function(){
					return $("#txtperiode_awal_searchbc25").val();
				},
				tglakhir: function(){
					return $("#txtperiode_akhir_searchbc25").val();
				}
			}; */
			
			var form_data = {
				tglawal:$("#txtperiode_awal_searchbc25").val(), tglakhir:$("#txtperiode_akhir_searchbc25").val() 
			};
			
			
			jQuery("#tblbc25hdr").jqGrid('setGridParam', { postData:form_data });
			$('#tblbc25hdr').trigger('reloadGrid');
			
			var myPostData = $('#tblbc25hdr').jqGrid("getGridParam", "postData");
			/* delete myPostData.tglawal;
			delete myPostData.tglakhir; */
			
		
		});
		
		$("#btnclearsearchbc25").button().click(function(){
			var myPostData = $('#tblbc25hdr').jqGrid("getGridParam", "postData");
			delete myPostData.tglawal;
			delete myPostData.tglakhir;
			$('#tblbc25hdr').trigger('reloadGrid');
		});

	});
		  	
</script>



	
	