develog

[bootstrap] datepicker 본문

카테고리 없음

[bootstrap] datepicker

냐옴 2022. 1. 6. 15:32

 

$('.datepicker').datepicker({
    format: 'yyyy-mm-dd',
    language: 'ko',
    todayHighlight: true,
    autoclose: true,
});

 

$(document).ready(function () {

    $('.item_add_option_box dl dt span[class*=optionTextNm]').each(function(index, elem) {
        if ($(elem).text().indexOf("날짜") > -1) {
            let inputText = $(elem).parent().parent().children('dd').children('input[type=text]');
            $(inputText).prop('placeholder', 'YYYY-MM-DD');
            $(inputText).datepicker({
                format: 'yyyy-mm-dd',
                language: 'ko',
                todayHighlight: true,
                autoclose: true,
            });
        }
    });
    
});

 

https://bootstrap-datepicker.readthedocs.io/en/latest/

 

bootstrap-datepicker — bootstrap-datepicker documentation

Data API As with bootstrap’s own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set data-provide="datepicker" on the element you want to initialize,

bootstrap-datepicker.readthedocs.io

 

https://github.com/uxsolutions/bootstrap-datepicker

 

GitHub - uxsolutions/bootstrap-datepicker: A datepicker for twitter bootstrap (@twbs)

A datepicker for twitter bootstrap (@twbs). Contribute to uxsolutions/bootstrap-datepicker development by creating an account on GitHub.

github.com

 

https://uxsolutions.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&maxViewMode=4&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox 

 

Datepicker for Bootstrap

 

uxsolutions.github.io

 

라이브러리 다운로드

https://github.com/uxsolutions/bootstrap-datepicker/releases

 

Releases · uxsolutions/bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs). Contribute to uxsolutions/bootstrap-datepicker development by creating an account on GitHub.

github.com

 

Comments