<div class="container-fluid">
<p>
예를 들어, 다음은 기본 설정이 있는 입력 날짜입니다.:
</p>
<div class="form-group">
<label for="theDate">InputDate</label>
<input id="theDate">
</div>
<div>
현재 날짜는 <b><span id="theDateOutput"></span></b>입니다.
</div>
<hr />
<p>
기본적으로 InputDate 값이 필요하므로 컨트롤의 전체 내용을 삭제할 수 없습니다. 선택적 날짜를 입력하려면 <b>isRequired </b> 속성을 false로 설정해주세요.:
</p>
<div class="form-group">
<label for="theDateNotRequired">필수 아님</label>
<input id="theDateNotRequired">
</div>
</div>
xxxxxxxxxx
@font-face {
font-family: 'S-CoreDream-3Light';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff') format('woff');
font-weight: normal;
font-style: normal;
}
body {
margin: 20px;
font-family: 'S-CoreDream-3Light';
}
label {
width: 100px;
text-align: right;
margin-right: 3px;
}
.container-fluid{
background-color:#ededed;
padding:10px;
border-radius:10px;
}
xxxxxxxxxx
document.readyState === 'complete' ? init() : window.onload = init;
//
function init() {
// 일반 입력 날짜
let theDate = new wijmo.input.InputDate('#theDate', {
valueChanged: () => showCurrentDate(theDate)
});
showCurrentDate(theDate);
//
// 지울 수 있음
let theDateNotRequired = new wijmo.input.InputDate('#theDateNotRequired', {
isRequired: false,
value: null,
placeholder: '생년월일 (옵션)'
});
//
// 현재 선택된 날짜 표시
function showCurrentDate(ctrl) {
let el = document.querySelector('#theDateOutput');
el.textContent = wijmo.Globalize.format(ctrl.value, 'D');
}
}