add simak to git repo
This commit is contained in:
46
app/setor/modal_edit_setor.php
Normal file
46
app/setor/modal_edit_setor.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<script type="text/javascript">
|
||||
$('.date').datepicker({format: 'dd/mm/yyyy',todayHighlight:'TRUE',autoclose: true,orientation:"bottom"});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include('../koneksi.php');
|
||||
$id=$_POST['id'];
|
||||
$h=pg_query("SELECT tanggal_setor FROM vr_pelunasan WHERE id='$id'");
|
||||
while($r=pg_fetch_array($h)) {$tanggal_setor=$r[0];}
|
||||
?>
|
||||
|
||||
<input type="hidden" id="edit_setor_id" value="<?php echo $id; ?>">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Tanggal Setor</label>
|
||||
<input type="text" class="date form-control" id="edit_tgl_modal_setor" placeholder="dd/mm/yyyy"
|
||||
onkeyup="
|
||||
var v = this.value;
|
||||
if (v.match(/^\d{2}$/) !== null) {
|
||||
this.value = v + '/';
|
||||
} else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
|
||||
this.value = v + '/';
|
||||
}
|
||||
"
|
||||
value="<?php
|
||||
$tpk=date('d-m-Y',strtotime($tanggal_setor));
|
||||
if (($tpk=="01-01-1970") || ($tpk==NULL) || ($tpk=="")) {
|
||||
echo "";
|
||||
} else {
|
||||
echo date('d/m/Y',strtotime($tanggal_setor));
|
||||
}
|
||||
?>"
|
||||
>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#edit_tgl_modal_setor').bind('input', function() {
|
||||
var a = $('#edit_tgl_modal_setor').val();
|
||||
if (!a) {
|
||||
var now = new Date();
|
||||
var day = ("0" + now.getDate()).slice(-2);
|
||||
var month = ("0" + (now.getMonth() + 1)).slice(-2);
|
||||
var today = (day) + "/" + (month) + "/" + now.getFullYear();
|
||||
$('#edit_tgl_modal_setor').val(today);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user