Last active
September 6, 2020 00:45
-
-
Save ghostflare76/73a34eac30add0b890fc1ca00a1053d4 to your computer and use it in GitHub Desktop.
zeppelin 날짜 입력
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%angular | |
<!-- Include Date Range Picker --> | |
<script type="text/javascript" src="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.js"></script> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.css" /> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%angular | |
<input id="start1" ng-model="start" style="visibility: hidden;"></input> | |
<div class="col-md-4"> | |
날짜를 선택해주세요. | |
<fieldset> | |
<div class="control-group"> | |
<div class="controls"> | |
<div class="input-prepend input-group"> | |
<span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span> | |
<input type="text" style="width: 200px" name="birthdate" id="birthdate" class="form-control" ng-model="start1" /> | |
<button type="submit" class="btn btn-primary pull-left" ng-click=" | |
z.angularBind('start',start,'20180209-100228_1150472074');z.runParagraph('20180209-100228_1150472074'); | |
"> 조회</button> | |
</div> | |
</div> | |
</div> | |
</fieldset> | |
</div> | |
<script type="text/javascript"> | |
$(function() { | |
var dateFormat = 'YYYY-MM-DD'; | |
var start = moment(); | |
function cb (start) { | |
// $('#birthdate').val(start.format(dateFormat)); | |
$('#start1').val(start.format(dateFormat).toString()); | |
$('#start1').trigger('input'); // Use for Chrome/Firefox/Edge | |
$('#start1').trigger('change'); // Use for Chrome/Firefox/Edge + IE11 | |
} | |
$('input[name="birthdate"]').daterangepicker({ | |
singleDatePicker: true, | |
showDropdowns: true, | |
locale: { | |
format: 'YYYY-MM-DD' | |
} | |
}, cb); | |
cb(start); | |
}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%angular | |
<input id="start" ng-model="start" style="visibility: hidden;"></input> | |
<input id="end" ng-model="end" style="visibility: hidden;"></input> | |
<div class="col-md-4"> | |
날짜를 선택해주세요. | |
<fieldset> | |
<div class="control-group"> | |
<div class="controls"> | |
<div class="input-prepend input-group"> | |
<span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span> | |
<input type="text" style="width: 200px" name="duration" id="duration" class="form-control" /> | |
<button type="submit" class="btn btn-primary pull-left" ng-click=" | |
z.angularBind('start',start,'20180209-131429_523775050');z.angularBind('end',end,'20180209-131429_523775050');z.runParagraph('20180209-131429_523775050'); | |
z.angularBind('start',start,'20180209-131921_1896797217');z.angularBind('end',end,'20180209-131921_1896797217');z.runParagraph('20180209-131921_1896797217'); | |
"> 조회</button> | |
</div> | |
</div> | |
</div> | |
</fieldset> | |
</div> | |
<script type="text/javascript"> | |
$(function() { | |
var start = moment(); | |
var end = moment(); | |
var dateFormat = 'YYYY-MM-DD'; | |
function cb (start, end) { | |
$('#start').val(start.format(dateFormat).toString()); | |
$('#start').trigger('input'); // Use for Chrome/Firefox/Edge | |
$('#start').trigger('change'); // Use for Chrome/Firefox/Edge + IE11 | |
$('#end').val(end.format(dateFormat).toString()); | |
$('#end').trigger('input'); // Use for Chrome/Firefox/Edge | |
$('#end').trigger('change'); // Use for Chrome/Firefox/Edge + IE11 | |
} | |
$('input[name="duration"]').daterangepicker({ | |
startDate: start, | |
endDate: end, | |
showDropdowns: true, | |
ranges: { | |
'오늘': [moment(), moment()], | |
'어제': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], | |
'지난 7일': [moment().subtract(6, 'days'), moment()], | |
'지난 30일': [moment().subtract(29, 'days'), moment()], | |
'이번달': [moment().startOf('month'), moment().endOf('month')], | |
'지난달': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] | |
}, | |
locale: { | |
format: 'YYYY-MM-DD' | |
} | |
}, cb); | |
cb(start,end); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment