<div style="padding:10px;"></div>
<div class="detil" style="padding: 4px;font-size:14px;margin-top:25px;width: 78%;margin: 0 auto;border-color: #FFFFFF;">
                <form id="frm_putusan" style="padding: 4px;background:white;margin:0;" method="post" action="<?php echo base_url().'detil_pk/simpan_pendapat_hakim';?>">
                <table id="tableDetilPerkara" style="font-size:14px;">
                <col width="25%">
                <col width="75%">
                <tbody>
                        <tr id="tr_pihak">
                                <td colspan="2" class="divider">Edit - Pendapat Hakim</td>
                                <input type="hidden" id="curr_date" value="<?php echo date('d/mY');?>">
                                <input type="hidden" name="perkara_id" id="perkara_id" value="<?php echo $perkara_id;?>">
                        </tr>
                        <tr>
                                <td>Tanggal Pendapat Hakim<font color="red">*</font></td>
                                <td style="padding:0px;padding-left:5px;">
                                <input id="tanggal_hakim" name="tanggal_hakim" value="<?php echo (!empty($pendapat_hakim) ? $pendapat_hakim : '');?>" class="datepicker" maxlength="10" placeholder="tgl/bln/tahun">
                                </td>
                        </tr>
                        <tr>
                                <td valign="top" style="vertical-align:top;">Isi Pendapat Hakim<font color="red">*</font></td>
                                <td style="background:white;" id="hakim_text">
                                        <?php echo $this->ckeditor->editor("hakim",$isi_pendapat_hakim);?>
                                </td>
                        </tr>                       
                        <tr>
                                <td colspan="2" style="background:white;" align="center">
                                <input type="button" value="Kembali" id="kembali" class="btn">
                                <input type="submit" id="simpan" value="Simpan" class="btn">
                                </td>
	           </tr>
                </tbody>
                </table>
                </form>
</div>
<div style="padding:5px;"></div>
<script type="text/javascript">

$('#kembali').closingFormWin();
$('#frm_putusan').SubmitHandling({
	refresh:'1',
	setRefresh:1,
	divRef:'#konten',
	clicked:1,
	btnClicked:'.close_form',
	whenStatus:1,
	isCKEdit:1,
	tdID:'hakim_text',
	textID:'hakim',
});
$( document ).ready(function() {
            $('.datepicker').ValidateDateInput();

            $('#tanggal_hakim').datepicker({
                        inline: true,
                        showOtherMonths: true,
                        dateFormat: 'dd/mm/yy',
                        dayNamesMin: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
                        beforeShowDay: $.datepicker.noWeekends,
                        onSelect: function(dateText, inst) {
                        	var date = $(this).datepicker('getDate');
                        	var dayOfWeek = weekday[date.getDay()];
                        	var error = 0;
                        	var message ='';
                        	if(dayOfWeek=='Sunday' || dayOfWeek=='Saturday'){
                        		message ='Tidak Dapat Memilih diluar Hari Kerja.';
                        		message_error_show_parent(message);
                        		return;
                        	}
            				
            	var tmp = $(this).val().split("/");
            	var tmp2 = $('#curr_date').val().split("/");
            	if((new Date(tmp[2]+"-"+tmp[1]+"-"+tmp[0]+"T00:00:00").getTime() > new Date(tmp2[2]+"-"+tmp2[1]+"-"+tmp2[0]+"T00:00:00").getTime())){
                                    message = 'Tidak Dapat Memilih Melebihi Hari ini. Sekarang Tanggal '+$('#curr_date').val();
                                    message_error_show_parent(message);
                                    $(this).css("background-color", "red");
            	}else{
                                    $(this).css("background-color", "#dedbdb");
            	}
            	}
            });
});
</script>
