데이트피커 기본값 적용 방식 가이드
데이트피커 default_value 관련 속성에 대한 예시 화면이다.
데이트피커 기본값은 default_value, default_value_type, default_value_gap 속성에 의해서 결정된다.
예시
템플릿 위치: /HTML5/COMPONENT/DATEPICKER/datepicker_defaultvalue
템플릿 파일
화면 스크립트
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
// default_value 속성값에 지정된 값이 적용된다. (default_value 속성값: 20230725) function btn_value_on_mouseup(objInst) { var date_value; date_value = dat_value.getdefaultvalue(); factory.consoleprint( "date_value = " + date_value); dat_value.settext(date_value); } // 오늘 날짜가 적용된다. function btn_today_on_mouseup(objInst) { var date_value; date_value = factory.datetoday(); factory.consoleprint( "date_value = " + date_value); dat_today.settext(date_value); } // 오늘 날짜를 기준으로 속성값의 날짜 간격을 일단위로 설정한다. (default_value_gap 속성값: 1) function btn_day_gap_on_mouseup(objInst) { var date_value; date_value = factory.datefrom( "day" , dat_daygap.getdefaultvaluegap()); factory.consoleprint( "date_value = " + date_value); dat_daygap.settext(date_value); } // 오늘 날짜를 기준으로 속성값의 날짜 간격을 주단위로 설정한다. (default_value_gap 속성값: 1) function btn_week_gap_on_mouseup(objInst) { var date_value; date_value = factory.datefrom( "day" , dat_weekgap.getdefaultvaluegap() * 7); factory.consoleprint( "date_value = " + date_value); dat_weekgap.settext(date_value); } // 오늘 날짜를 기준으로 속성값의 날짜 간격을 월단위로 설정한다. (default_value_gap 속성값: 1) function btn_month_gap_on_mouseup(objInst) { var date_value; date_value = factory.datefrom( "month" , dat_monthgap.getdefaultvaluegap()); factory.consoleprint( "date_value = " + date_value); dat_monthgap.settext(date_value); } // 오늘 날짜를 기준으로 날짜 간격을 년단위로 설정한다. (default_value_gap 속성값: 1) function btn_year_gap_on_mouseup(objInst) { var date_value; date_value = factory.datefrom( "year" , dat_yeargap.getdefaultvaluegap()); factory.consoleprint( "date_value = " + date_value); dat_yeargap.settext(date_value); } // 오늘 날짜에 해당하는 월의 1일 날짜가 적용된다. function btn_firstday_of_month_on_mouseup(objInst) { var date_value; date_value = factory.datefirstdayofmonth(); factory.consoleprint( "date_value = " + date_value); dat_firstdayofmonth.settext(date_value); } // 오늘 날짜에 해당하는 월의 마지막 날짜가 적용된다. function btn_last_day_of_month_on_mouseup(objInst) { var date_value; date_value = factory.datelastdayofmonth(); factory.consoleprint( "date_value = " + date_value); dat_lastdayofmonth.settext(date_value); } // 오늘 날짜에 해당하는 주의 첫번째 날짜가 적용된다. function btn_first_day_of_week_on_mouseup(objInst) { var date_value; date_value = factory.datefirstdayofweek(); factory.consoleprint( "date_value = " + date_value); dat_firstdayofweek.settext(date_value); } // 오늘 날짜에 해당하는 주의 마지막 날짜가 적용된다. function btn_lastday_of_week_on_mouseup(objInst) { var date_value; date_value = factory.datelastdayofweek(); factory.consoleprint( "date_value = " + date_value); dat_lastdayofweek.settext(date_value); } // 오늘 날짜에 해당하는 월요일 날짜가 적용된다. function btn_monday_or_week_on_mouseup(objInst) { var date_value; date_value = factory.datemondayofweek(); factory.consoleprint( "date_value = " + date_value); dat_mondayorweek.settext(date_value); } // 오늘 날짜에 해당하는 금요일 날짜가 적용된다. function btn_friday_of_week_on_mouseup(objInst) { var date_value; date_value = factory.datefridayofweek(); factory.consoleprint( "date_value = " + date_value); dat_fridayofweek.settext(date_value); } // default_value 속성값 반환 function btn_getdefaultvalue_on_mouseup(objInst) { var default_value; default_value = dat_datepickerapi.getdefaultvalue(); factory.consoleprint( "getdefaultvalue return = " + default_value); } // default_value_gap 속성값 반환 function btn_getdefaultvaluegap_on_mouseup(objInst) { var default_value_gap; default_value_gap = dat_datepickerapi.getdefaultvaluegap(); factory.consoleprint( "getdefaultvaluegap return = " + default_value_gap); } |