├── src ├── mg-datepicker.jade ├── app.coffee ├── datepicker-modal.jade ├── datepicker-modal.scss ├── datepicker-modal.controller.coffee ├── datepicker-modal.service.coffee ├── mg-datepicker.scss ├── calendar.service.coffee └── mg-datepicker.directive.coffee ├── release ├── mg-datepicker.html ├── datepicker-modal.html ├── datepicker-modal.css.map ├── date-period-picker-templates.js ├── datepicker-modal.css ├── mg-datepicker.css.map ├── mg-datepicker.css └── date-period-picker.js ├── .DS_Store ├── .gitignore ├── resource └── image │ └── popup-screen-capture.png ├── package.json ├── COPYING ├── bower.json ├── Gruntfile.js ├── README.md └── LICENSE /src/mg-datepicker.jade: -------------------------------------------------------------------------------- 1 | .datepicker -------------------------------------------------------------------------------- /release/mg-datepicker.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /src/app.coffee: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | angular.module 'datePeriodPicker', [ ] -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/date-period-picker/master/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | 3 | .idea 4 | .sass-cache 5 | node_modules -------------------------------------------------------------------------------- /resource/image/popup-screen-capture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naver/date-period-picker/master/resource/image/popup-screen-capture.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "date-period-picker", 3 | "devDependencies" : { 4 | "grunt": "*", 5 | "grunt-angular-templates": "^0.5.7", 6 | "grunt-contrib-coffee": "*", 7 | "grunt-contrib-jade": "*", 8 | "grunt-contrib-sass": "*", 9 | "node-markdown": "^0.1.1" 10 | } 11 | } -------------------------------------------------------------------------------- /src/datepicker-modal.jade: -------------------------------------------------------------------------------- 1 | #custom-modal(ng-click="close()", ng-show="options.display") 2 | #overlay(ng-click="$event.stopPropagation()" ng-style="options.overlayZIndex") 3 | mg-datepicker(mg-start="start", mg-end="end", mg-select="close()", mg-button-name="buttonName", mg-callback="callback", mg-options="options") 4 | #fade(ng-style="options.fadeZIndex") 5 | a.btn_calendar_close(href='javascript:;') 6 | span.blind 달력 닫기 -------------------------------------------------------------------------------- /release/datepicker-modal.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2016 NAVER Corp. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /release/datepicker-modal.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "AAAA,QAAS;EACP,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,GAAG;EACT,KAAK,EAAE,GAAG;EACV,GAAG,EAAE,IAAI;EACT,MAAM,EAAC,GAAG;EACV,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,GAAG;EACZ,QAAQ,EAAE,IAAI;;AAGhB,KAAM;EACJ,QAAQ,EAAE,KAAK;EACf,IAAI,EAAE,EAAE;EACR,GAAG,EAAE,EAAE;EACP,gBAAgB,EAAE,KAAK;EACvB,OAAO,EAAE,GAAG;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,EAAE;;AAGb,yBAA0B;EACxB,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,KAAK;EACf,KAAK,EAAE,IAAI;EACX,GAAG,EAAE,IAAI;EACT,OAAO,EAAE,IAAI;EACb,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,gBAAgB,EAAE,4CAA4C;EAC9D,iBAAiB,EAAE,SAAS;EAC5B,uBAAuB,EAAE,WAAW;EACpC,eAAe,EAAE,WAAW;EAC5B,mBAAmB,EAAE,YAAY", 4 | "sources": ["../src/datepicker-modal.scss"], 5 | "names": [], 6 | "file": "datepicker-modal.css" 7 | } 8 | -------------------------------------------------------------------------------- /src/datepicker-modal.scss: -------------------------------------------------------------------------------- 1 | #overlay { 2 | position: fixed; 3 | left: 5px; 4 | right: 5px; 5 | top: 53px; 6 | bottom:5px; 7 | background-color: #ffffff; 8 | z-index: 100; 9 | overflow: auto; 10 | } 11 | 12 | #fade { 13 | position: fixed; 14 | left: 0%; 15 | top: 0%; 16 | background-color: black; 17 | opacity: .70; 18 | width: 100%; 19 | height: 100%; 20 | z-index: 90; 21 | } 22 | 23 | #fade .btn_calendar_close { 24 | display: block; 25 | position: fixed; 26 | right: 10px; 27 | top: 25px; 28 | z-index: 3001; 29 | width: 20px; 30 | height: 20px; 31 | background-image: url("/hotels/assets/images/sp_hotel_v1.png"); 32 | background-repeat: no-repeat; 33 | -webkit-background-size: 235px 222px; 34 | background-size: 235px 222px; 35 | background-position: -71px -171px; 36 | } -------------------------------------------------------------------------------- /release/date-period-picker-templates.js: -------------------------------------------------------------------------------- 1 | angular.module('datePeriodPicker').run(['$templateCache', function($templateCache) { 2 | 'use strict'; 3 | 4 | $templateCache.put('release/datepicker-modal.html', 5 | "" 6 | ); 7 | 8 | 9 | $templateCache.put('release/mg-datepicker.html', 10 | "" 11 | ); 12 | 13 | }]); 14 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "date-period-picker", 3 | "version": "0.3.30", 4 | "homepage": "https://github.com/kccho/date-picker", 5 | "authors": [ 6 | "seunglak| SUN | MON | TUE | WED | THU | FRI | SAT |
|---|---|---|---|---|---|---|
| '
142 | str += ' '
143 | str += ' ' + dateObj.getDate() + ' '
144 | if scope.mgOptions.project == 'flights' # flights
145 | addStr = ''
146 | if scope.mgOptions.trip == 'rt' && scope.calendar.isRoundTripSameDate(dateObj) # 왕복일때 가는날,오는날 같다
147 | addStr = '당일 '
148 | else
149 | if numClass.indexOf('today') != -1
150 | addStr = '오늘 '
151 | else
152 | if scope.calendar.isSdate0(dateObj)
153 | addStr += '' + scope.mgOptions.sdate0String + ' '
154 | if scope.calendar.isSdate1(dateObj)
155 | addStr += '' + scope.mgOptions.sdate1String + ' '
156 | if scope.calendar.isSdate2(dateObj)
157 | addStr += '' + scope.mgOptions.sdate2String + ' '
158 | str += addStr
159 | else
160 | # 오늘
161 | if numClass.indexOf('today') != -1
162 | str += '오늘 '
163 | # 체크인
164 | if scope.calendar.isStart(dateObj)
165 | str += '' + scope.mgOptions.checkInString + ' '
166 | # 체크아웃
167 | if scope.calendar.isEnd(dateObj)
168 | str += '' + scope.mgOptions.checkOutString + ' '
169 | str += ' | '
170 | str += '
| SUN | MON | TUE | WED | THU | FRI | SAT |
|---|---|---|---|---|---|---|
| ';
2395 | str += ' ';
2396 | str += ' ' + dateObj.getDate() + ' ';
2397 | if (scope.mgOptions.project === 'flights') {
2398 | addStr = '';
2399 | if (scope.mgOptions.trip === 'rt' && scope.calendar.isRoundTripSameDate(dateObj)) {
2400 | addStr = '당일 ';
2401 | } else {
2402 | if (numClass.indexOf('today') !== -1) {
2403 | addStr = '오늘 ';
2404 | } else {
2405 | if (scope.calendar.isSdate0(dateObj)) {
2406 | addStr += '' + scope.mgOptions.sdate0String + ' ';
2407 | }
2408 | if (scope.calendar.isSdate1(dateObj)) {
2409 | addStr += '' + scope.mgOptions.sdate1String + ' ';
2410 | }
2411 | if (scope.calendar.isSdate2(dateObj)) {
2412 | addStr += '' + scope.mgOptions.sdate2String + ' ';
2413 | }
2414 | }
2415 | }
2416 | str += addStr;
2417 | } else {
2418 | if (numClass.indexOf('today') !== -1) {
2419 | str += '오늘 ';
2420 | }
2421 | if (scope.calendar.isStart(dateObj)) {
2422 | str += '' + scope.mgOptions.checkInString + ' ';
2423 | }
2424 | if (scope.calendar.isEnd(dateObj)) {
2425 | str += '' + scope.mgOptions.checkOutString + ' ';
2426 | }
2427 | }
2428 | str += ' | ';
2429 | }
2430 | }
2431 | str += '