jqgrid 컬럼 datepicker 구현

JQUERY 2017. 3. 2. 18:00
1
2
3
4
5
6
7
8
9
10
colModel : [{name : to_date index : to_date align : "center" ,editable:true ,editoptions:{size:20, dataInit:function(el){ 
                                                                                                                            $(el).datepicker({dateFormat:'yy-mm-dd'}); 
                                                                                                                            }, defaultValue: function(){ 
                                                                                                                                                        var currentTime = new Date(); 
                                                                                                                                                        var month = parseInt(currentTime.getMonth() + 1); 
                                                                                                                                                        month = month <= "0"+month : month; 
                                                                                                                                                        var day = currentTime.getDate(); 
                                                                                                                                                        day = day <= "0"+day : day; 
                                                                                                                                                        var year = currentTime.getFullYear(); 
                                                                                                                                                        return year+"-"+month + "-"+day;}}}]
cs


괄호 유의해 주세요 ^^