728x90
<input type="text" name="date" class="date-range">
$(".date-range").daterangepicker({
autoUpdateInput: false,
locale: {
format: "YYYY-MM-DD",
daysOfWeek: ["일", "월", "화", "수", "목", "금", "토"],
monthNames: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
}
}, function(start, end) {
$(".date-range").val(start.format("YYYY-MM-DD") + " - " + end.format("YYYY-MM-DD"));
});
autoUpdateInput: false
이렇게 해야 값이 미리 들어가 있지 않습니다.
다만 이렇게 할 경우 아래처럼 값을 다시 설정해 줘야 합니다.
$(".date-range").val() 어쩌고 저쩌고...
반응형
'Etc' 카테고리의 다른 글
Swiper에 ajax로 추가할 경우 (2) | 2021.09.13 |
---|---|
[php.ini]파일 업로드 용량 관련 (0) | 2021.08.05 |
엑셀에서 다음 줄(alt + enter) 제거하기 (0) | 2021.07.01 |
워드프레스에서 성인 팝업이 뜨는 악성 코드 (0) | 2021.06.02 |
[phpMyAdmin]설정 파일에 잘못된 권한이 지정되어있습니다. 익명 쓰기 권한이면 안됩니다! (0) | 2021.03.26 |
Comments