@ezuikit/control-date-picker 1.0.4 → 1.0.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -5
- package/dist/style.js +1 -1
- package/package.json +11 -13
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @ezuikit/control-date-picker v1.0.4
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2026-01-01 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
"use strict";var delegate=require("@skax/delegate"),utilsTools=require("@ezuikit/utils-tools"),deepmerge=require("deepmerge"),Picker=require("@skax/picker"),Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day))}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:!1,showSuperNextIcon:!1,showPrevIcon:!1,showNextIcon:!1,showHeaderClose:!1,showHeaderOk:!1,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return'<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:!1}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners()}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""))},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html}},_proto.destroy=function(){this.$header&&this.$header.remove()},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options)}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options)}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options)}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options)}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault())}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault())}))},Header}();function _extends$2(){return _extends$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$2.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:!0},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:!1}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container)}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh}else this.locale=this.options.locales.zh},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$3(o,p){return _set_prototype_of$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3(o,p)}var _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:!0,showSuperPrevIcon:!0,showSuperNextIcon:!0,showPrevIcon:!0,showNextIcon:!0,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return(_this=Container.call(this,container,_extends$1({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,!1),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,!1),_this._onHeader(),_this._onCell(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$3(subClass,superClass)}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=!0),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?utilsTools.DateTime.toDate(date):date,(!this._current||utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,utilsTools.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=utilsTools.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected")}this._setRenderCurrent(this._current)}catch(error){this._setRenderCurrent(new Date)}else this._setRenderCurrent(new Date);var left,right},_proto.updateBadges=function(badges){this._updateBadges(badges)},_proto._updateBadges=function(badges,rerender){void 0===rerender&&(rerender=!0),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return utilsTools.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate())},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&utilsTools.DateTime.format(this._renderCurrent,"YYYY-MM")!==utilsTools.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate())},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,utilsTools.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault()})},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent)},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent)},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent)},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent)},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent)}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent)})},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current)},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current)},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return"<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body)},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=utilsTools.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return"<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(utilsTools.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return'<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("")}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$2(o,p){return _set_prototype_of$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2(o,p)}Calendar.DateTime=utilsTools.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:!0,showSuperPrevIcon:!0,showSuperNextIcon:!0,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return(_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:!1,showNextIcon:!1,prefixCls:"emonth"}],{clone:!1}))||this)._render(),_this.setCurrent(_this.options.current,!1),_this._onHeaderTitle(),_this._onCell(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$2(subClass,superClass)}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){void 0===change&&(change=!0),this._setCurrent(date,change)},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=utilsTools.DateTime.toDate(d));var current=d;this._current&&utilsTools.DateTime.format(current,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,utilsTools.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current)}catch(error){this._setRenderCurrent(new Date)}else this._setRenderCurrent(new Date);var left,right},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&utilsTools.DateTime.format(date,"YYYY")!==utilsTools.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=utilsTools.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected")}this._setHeader()},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current)},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current)},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY-MM"),disabled)})},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent)},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent)},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent)})},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>"}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=utilsTools.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+utilsTools.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,utilsTools.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled")}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body)},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return"<tr>\n "+month.map(function(m,i){return'<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(utilsTools.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled()},_create_class$2(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Constructor.prototype,protoProps),Constructor}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:!0,showSuperPrevIcon:!0,showSuperNextIcon:!0,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return(_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:!1,showNextIcon:!1,renderPrevIcon:"",renderNextIcon:""}],{clone:!1}))||this)._render(),_this._setCurrent(_this.options.current,!1),_this._onCell(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of$1(subClass,superClass)}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){void 0===change&&(change=!0),this._setCurrent(year,change)},_proto._setCurrent=function(year,change){void 0===change&&(change=!0);var left,right,_year="number"==typeof year?utilsTools.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&utilsTools.DateTime.format(_year,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList()},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current)},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current)},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault()})},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList()},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList()},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body)},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return"<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return+y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(utilsTools.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(utilsTools.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ")},_create_class$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:!1,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return(_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:!1}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:!1}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of(subClass,superClass)}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){void 0===change&&(change=!0),this._setCurrent(date,change)},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges))},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this)},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=!0),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change)},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top")},_proto.hide=function(){this.open=!1},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,!1)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode)},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===utilsTools.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk)}})))},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM")===utilsTools.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk)},onYear:this._onYear.bind(this)})))},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY")===utilsTools.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk)}})))},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide()},_proto._onClose=function(){this.hide()},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,!0)},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode()},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode())},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode()},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode()},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode)},_create_class(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);exports.Calendar=Calendar,exports.DatePicker=DatePicker,exports.Header=Header,exports.Month=Month,exports.Year=Year;
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @ezuikit/control-date-picker v1.0.4
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2026-01-01 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).DatePicker={})}(this,function(exports){"use strict";function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var hasRequiredDelegate,delegate$2={exports:{}};
|
package/dist/style.css
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
.epicker-body-noscroll{overflow:hidden;touch-action:none}.epicker{box-shadow:0 9px 28px 8px #0000000d;display:none;margin:0;opacity:0;padding:0;position:absolute;transition:opacity .3s ease;vertical-align:top;z-index:1000}.epicker,.epicker-body{box-sizing:border-box;flex-direction:column}.epicker-body{display:flex}.epicker.epicker-mobile .epicker-mask{background:#0000004d;bottom:0;box-sizing:border-box;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:9998}.epicker.epicker-mobile .epicker-body{align-items:center;bottom:0;left:0;position:fixed;right:0;z-index:9999}
|
|
2
|
-
:root{--edate-header-height:34px;--edate-footer-height:var(--edate-header-height,34px);--edate-font-size:14px;--edate-default-color:rgba(0,0,0,.88);--edate-primary-color:#648ffc;--edate-hover-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-hover-bg-color:rgba(0,0,0,.04);--edate-active-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-active-bg-color:#e6f4ff;--edate-disabled-color:rgba(0,0,0,.25);--edate-disabled-bg-color:rgba(0,0,0,.04);--edate-disabled-active-bg-color:rgba(0,0,0,.25);--edate-border-color:rgba(5,5,5,.06);--edate-border-radius:2px;--edate-close-color:#f05757;--edate-calendar-border-radius:50%;--edate-calendar-cell-width:26px;--edate-calendar-cell-height:26px;--edate-badge-color:var(--edate-primary-color,#648ffc);--edate-arrow-color:rgba(0,0,0,.45);--edate-arrow-hover-color:var(--edate-default-color,rgba(0,0,0,.88))}.epicker-mobile .edate-mobile{--edate-hover-bg-color:transparent}.edate-container{background-color:#fff;box-sizing:border-box;display:flex;font-size:14px;max-height:80%;min-width:246px;text-align:center;width:100%}.edate-container *{border:none;box-sizing:border-box;margin:0;outline:none;padding:0;-webkit-tap-highlight-color:transparent}.edate-container li,.edate-container ul{border:0;box-sizing:border-box;list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-container table,.edate-container tbody,.edate-container td,.edate-container th,.edate-container thead,.edate-container tr{border:0;border-color:transparent;border-spacing:0;box-sizing:border-box;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-container table:active,.edate-container table:focus,.edate-container table:focus-visible,.edate-container tbody:active,.edate-container tbody:focus,.edate-container tbody:focus-visible,.edate-container td:active,.edate-container td:focus,.edate-container td:focus-visible,.edate-container th:active,.edate-container th:focus,.edate-container th:focus-visible,.edate-container thead:active,.edate-container thead:focus,.edate-container thead:focus-visible,.edate-container tr:active,.edate-container tr:focus,.edate-container tr:focus-visible{background-color:transparent}.edate-container table{height:100%}.edate-panel{display:flex;flex-direction:column;width:100%}.edate-header{align-items:center;border-bottom:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;color:var(--edate-default-color,rgba(0,0,0,.88));display:flex;font-weight:600;height:var(--edate-header-height,34px);justify-content:space-between;line-height:var(--edate-header-height,34px);padding:2px 15px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-header-view{text-align:center;width:40%}.edate-header-title-hover{cursor:pointer;transition:color .2s ease-in-out}.edate-header-title-hover:hover{color:var(--edate-primary-color,#1677ff)}.edate-next-btns,.edate-prev-btns{display:inline-flex;height:var(--edate-header-height,34px);line-height:var(--edate-header-height,34px)}.edate-next-btn,.edate-prev-btn,.edate-super-next-btn,.edate-super-prev-btn{align-items:center;background:0 0;border:0;box-sizing:border-box;color:var(--edate-arrow-color,rgba(0,0,0,.45));cursor:pointer;display:inline-flex;font-size:var(--edate-font-size,14px);height:100%;justify-content:center;line-height:var(--edate-header-height,34px);min-width:1.6em;padding:0;transition:color .2s}.edate-next-btn:not(.edate-disabled):active,.edate-prev-btn:not(.edate-disabled):active,.edate-super-next-btn:not(.edate-disabled):active,.edate-super-prev-btn:not(.edate-disabled):active{color:var(--edate-arrow-hover-color,rgba(0,0,0,.88))}.edate-next-icon,.edate-prev-icon,.edate-super-next-icon,.edate-super-prev-icon{display:inline-flex;height:6px;position:relative;transform:rotate(-45deg);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:6px}.edate-next-icon:before,.edate-prev-icon:before,.edate-super-next-icon:before,.edate-super-prev-icon:before{inset-inline-start:0;top:0}.edate-next-icon:before,.edate-prev-icon:before,.edate-super-next-icon:after,.edate-super-next-icon:before,.edate-super-prev-icon:after,.edate-super-prev-icon:before{border:0 solid;border-block-end-width:0;border-block-start-width:1.5px;border-inline-end-width:0;border-inline-start-width:1.5px;content:"";display:inline-block;height:6px;position:absolute;width:6px}.edate-super-next-icon:after,.edate-super-prev-icon:after{left:-4px;top:-4px}.edate-next-icon,.edate-super-next-icon{transform:rotate(135deg)}.edate-footer{align-items:center;border-bottom:1px solid var(--edate-border-color,rgba(5,5,5,.06));border-left:1px solid var(--edate-border-color,rgba(5,5,5,.06));border-right:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;display:flex;height:var(--edate-footer-height,34px);justify-content:space-between;padding:4px 5px}.edate-btn-text,.edate-now,.edate-today{color:var(--edate-primary-color,#1677ff);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-btn-text:not(.edate-disabled):active,.edate-now:not(.edate-disabled):active,.edate-today:not(.edate-disabled):active{opacity:.75}.edate-close-btn{align-items:center;cursor:pointer;font-size:24px}.edate-close-btn,.edate-close-btn .edate-close-icon{display:inline-flex}.edate-close-btn:active{color:var(--edate-close-color,#f05757)}.edate-btn-text{padding:2px 4px}.edate-btn-text.edate-disabled{color:var(--edate-disabled-color,rgba(0,0,0,.25))!important}.edate-btn{background-image:none;background:transparent;border:1px solid #d9d9d9;border-radius:2px;color:var(--edate-primary-color,#1677ff);cursor:pointer;display:inline-block;font-weight:400;height:20px;line-height:19px;min-width:32px;outline:none;padding:0 4px;position:relative;text-align:center;touch-action:manipulation;transition:all .2s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.edate-btn.edate-disabled{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important;border-color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;cursor:not-allowed!important}.edate-btn-primary{background-color:var(--edate-primary-color,#1677ff);border-color:var(--edate-primary-color,#1677ff);color:#fff}.edate-btn-primary:not(.edate-disabled):active{opacity:.75}.edate-disabled{cursor:not-allowed!important}.edate-disabled:before{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important}.edate-disabled:before,.edate-disabled>*{color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;cursor:not-allowed!important}.edate-picker-date .emonth-container,.edate-picker-date .eyear-container,.edate-picker-month .ecalendar-container,.edate-picker-month .eyear-container,.edate-picker-year .ecalendar-container,.edate-picker-year .emonth-container{display:none}.epicker-mobile.edate-picker-container{border-radius:10px;overflow:hidden}.epicker-mobile.edate-picker-container .epicker-body{background-color:#fff;border-top-left-radius:10px;border-top-right-radius:10px;overflow:hidden;padding-bottom:15px}.epicker-mobile.edate-picker-container .epicker-body .edate-panel{border:none}.epicker-mobile.edate-picker-container .epicker-body .edate-header{border-bottom:none;height:44px}
|
|
3
|
-
:root{--edate-header-height:34px;--edate-footer-height:var(--edate-header-height,34px);--edate-font-size:14px;--edate-default-color:rgba(0,0,0,.88);--edate-primary-color:#648ffc;--edate-hover-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-hover-bg-color:rgba(0,0,0,.04);--edate-active-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-active-bg-color:#e6f4ff;--edate-disabled-color:rgba(0,0,0,.25);--edate-disabled-bg-color:rgba(0,0,0,.04);--edate-disabled-active-bg-color:rgba(0,0,0,.25);--edate-border-color:rgba(5,5,5,.06);--edate-border-radius:2px;--edate-close-color:#f05757;--edate-calendar-border-radius:50%;--edate-calendar-cell-width:26px;--edate-calendar-cell-height:26px;--edate-badge-color:var(--edate-primary-color,#648ffc);--edate-arrow-color:rgba(0,0,0,.45);--edate-arrow-hover-color:var(--edate-default-color,rgba(0,0,0,.88))}.ecalendar{box-sizing:border-box;cursor:unset;line-height:normal;margin:0;padding-left:0;text-align:left}.ecalendar-panel{border:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;display:flex;flex-direction:column;width:100%}.ecalendar-body{box-sizing:border-box;color:var(--edate-default-color,rgba(0,0,0,.88));flex:1 1 auto;padding:6px 10px}.ecalendar-content{box-sizing:border-box;width:100%}.ecalendar-content th{height:30px}.ecalendar-content tr td{padding:3px 0}.ecalendar-content tr td:before{content:"";display:block;height:var(--edate-calendar-cell-height,24px);position:absolute;width:100%}.ecalendar-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.ecalendar-cell:not(.edate-disabled):hover .ecalendar-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.ecalendar-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.ecalendar-cell-in-view.ecalendar-cell-selected:not(.edate-disabled) .ecalendar-cell-inner{background-color:var(--edate-primary-color,#1677ff)!important;color:#fff}.ecalendar-cell-in-view.ecalendar-cell-selected:not(.edate-disabled) .ecalendar-badge{background-color:#fff}.ecalendar-cell-in-view.ecalendar-cell-selected.edate-disabled .ecalendar-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.25))}.ecalendar-cell-in-view.ecalendar-cell-today .ecalendar-cell-inner{border-color:var(--edate-primary-color,#1677ff)}.ecalendar-cell-in-view.ecalendar-cell-today.edate-disabled .ecalendar-cell-inner{border-color:var(--edate-disabled-bg-color,rgba(0,0,0,.25))}.ecalendar-cell-inner{align-items:center;border:1px solid transparent;border-radius:var(--edate-calendar-border-radius,2px);display:inline-flex;height:var(--edate-calendar-cell-height,26px);inset-inline-end:0;inset-inline-start:0;justify-content:center;line-height:var(--edate-calendar-cell-height,26px);padding:0;position:relative;transition:background .2s,border .2s;width:var(--edate-calendar-cell-width,26px);z-index:2}.ecalendar-cell .ecalendar-badge{background-color:var(--edate-primary-color,#1677ff);border-radius:50%;height:3px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(8px);width:3px;z-index:3}.ecalendar-cell.edate-disabled .ecalendar-badge{background-color:var(--edate-disabled-color,rgba(0,0,0,.25))}.epicker-mobile .ecalendar-content tr td{padding:8px 0}
|
|
4
|
-
:root{--edate-header-height:34px;--edate-footer-height:var(--edate-header-height,34px);--edate-font-size:14px;--edate-default-color:rgba(0,0,0,.88);--edate-primary-color:#648ffc;--edate-hover-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-hover-bg-color:rgba(0,0,0,.04);--edate-active-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-active-bg-color:#e6f4ff;--edate-disabled-color:rgba(0,0,0,.25);--edate-disabled-bg-color:rgba(0,0,0,.04);--edate-disabled-active-bg-color:rgba(0,0,0,.25);--edate-border-color:rgba(5,5,5,.06);--edate-border-radius:2px;--edate-close-color:#f05757;--edate-calendar-border-radius:50%;--edate-calendar-cell-width:26px;--edate-calendar-cell-height:26px;--edate-badge-color:var(--edate-primary-color,#648ffc);--edate-arrow-color:rgba(0,0,0,.45);--edate-arrow-hover-color:var(--edate-default-color,rgba(0,0,0,.88))}.emonth{cursor:unset;line-height:normal}.emonth-panel{background-color:#fff;border:1px solid var(--edate-border-color,rgba(5,5,5,.06));display:flex;flex-direction:column}.emonth-panel .emonth-body{padding:1px 8px}.emonth-panel table{width:100%}.emonth-panel .emonth-cell{height:52px}.emonth-panel .emonth-cell-inner{padding:0 8px}.emonth-body{color:var(--edate-default-color,rgba(0,0,0,.88));padding:0 10px}.emonth-content{width:100%}.emonth-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.emonth-cell:not(.edate-disabled):hover .emonth-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.emonth-cell:before{content:"";height:22px;inset-inline-end:0;inset-inline-start:0;position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;z-index:1}.emonth-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.emonth-cell-in-view.emonth-cell-selected:not(.edate-disabled) .emonth-cell-inner{background-color:var(--edate-primary-color,#1677ff)!important;color:#fff}.emonth-cell-in-view.emonth-cell-selected.edate-disabled .emonth-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important}.emonth-cell-inner{border-radius:var(--edate-border-radius,2px);display:inline-block;height:22px;line-height:22px;min-width:22px;position:relative;transition:background .2s,border .2s;z-index:2}
|
|
5
|
-
:root{--edate-header-height:34px;--edate-footer-height:var(--edate-header-height,34px);--edate-font-size:14px;--edate-default-color:rgba(0,0,0,.88);--edate-primary-color:#648ffc;--edate-hover-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-hover-bg-color:rgba(0,0,0,.04);--edate-active-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-active-bg-color:#e6f4ff;--edate-disabled-color:rgba(0,0,0,.25);--edate-disabled-bg-color:rgba(0,0,0,.04);--edate-disabled-active-bg-color:rgba(0,0,0,.25);--edate-border-color:rgba(5,5,5,.06);--edate-border-radius:2px;--edate-close-color:#f05757;--edate-calendar-border-radius:50%;--edate-calendar-cell-width:26px;--edate-calendar-cell-height:26px;--edate-badge-color:var(--edate-primary-color,#648ffc);--edate-arrow-color:rgba(0,0,0,.45);--edate-arrow-hover-color:var(--edate-default-color,rgba(0,0,0,.88))}.eyear{cursor:unset;line-height:normal}.eyear-layout{align-items:stretch;display:flex;flex-wrap:nowrap}.eyear-panel{background-color:#fff;border:1px solid var(--edate-border-color,rgba(5,5,5,.06));display:flex;flex-direction:column}.eyear-panel .eyear-body{padding:1px 8px}.eyear-panel table{width:100%}.eyear-panel .eyear-cell{height:52px}.eyear-panel .eyear-cell-inner{padding:0 8px}.eyear-body{padding:0 10px}.eyear-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.eyear-cell:not(.edate-disabled):hover .eyear-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.eyear-cell:before{content:"";height:22px;inset-inline-end:0;inset-inline-start:0;position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;z-index:1}.eyear-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.eyear-cell-in-view.eyear-cell-selected:not(.edate-disabled) .eyear-cell-inner{background-color:var(--edate-primary-color,#1677ff);color:#fff}.eyear-cell-in-view.eyear-cell-selected.edate-disabled .eyear-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))}.eyear-cell-inner{border-radius:var(--data-picker-border-radius,2px);display:inline-block;height:22px;line-height:22px;min-width:22px;position:relative;transition:background .2s,border .2s;z-index:2}
|
|
1
|
+
.epicker-body-noscroll{overflow:hidden;touch-action:none}.epicker{box-shadow:0 9px 28px 8px #0000000d;display:none;margin:0;opacity:0;padding:0;position:absolute;transition:opacity .3s ease;vertical-align:top;z-index:1000}.epicker,.epicker-body{box-sizing:border-box;flex-direction:column}.epicker-body{display:flex}.epicker.epicker-mobile .epicker-mask{background:#0000004d;bottom:0;box-sizing:border-box;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:9998}.epicker.epicker-mobile .epicker-body{align-items:center;bottom:0;left:0;position:fixed;right:0;z-index:9999}.epicker-mobile .edate-mobile{--edate-hover-bg-color:transparent}.edate-container{background-color:#fff;box-sizing:border-box;display:flex;font-size:14px;max-height:80%;min-width:246px;text-align:center;width:100%}.edate-container *{-webkit-tap-highlight-color:transparent;border:none;box-sizing:border-box;margin:0;outline:none;padding:0}.edate-container li,.edate-container ul{border:0;box-sizing:border-box;list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-container table,.edate-container tbody,.edate-container td,.edate-container th,.edate-container thead,.edate-container tr{border:0;border-color:transparent;border-spacing:0;box-sizing:border-box;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-container table:active,.edate-container table:focus,.edate-container table:focus-visible,.edate-container tbody:active,.edate-container tbody:focus,.edate-container tbody:focus-visible,.edate-container td:active,.edate-container td:focus,.edate-container td:focus-visible,.edate-container th:active,.edate-container th:focus,.edate-container th:focus-visible,.edate-container thead:active,.edate-container thead:focus,.edate-container thead:focus-visible,.edate-container tr:active,.edate-container tr:focus,.edate-container tr:focus-visible{background-color:transparent}.edate-container table{height:100%}.edate-panel{display:flex;flex-direction:column;width:100%}.edate-header{align-items:center;border-bottom:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;color:var(--edate-default-color,rgba(0,0,0,.88));display:flex;font-weight:600;height:var(--edate-header-height,34px);justify-content:space-between;line-height:var(--edate-header-height,34px);padding:2px 15px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-header-view{text-align:center;width:40%}.edate-header-title-hover{cursor:pointer;transition:color .2s ease-in-out}.edate-header-title-hover:hover{color:var(--edate-primary-color,#1677ff)}.edate-next-btns,.edate-prev-btns{display:inline-flex;height:var(--edate-header-height,34px);line-height:var(--edate-header-height,34px)}.edate-next-btn,.edate-prev-btn,.edate-super-next-btn,.edate-super-prev-btn{align-items:center;background:0 0;border:0;box-sizing:border-box;color:var(--edate-arrow-color,rgba(0,0,0,.45));cursor:pointer;display:inline-flex;font-size:var(--edate-font-size,14px);height:100%;justify-content:center;line-height:var(--edate-header-height,34px);min-width:1.6em;padding:0;transition:color .2s}.edate-next-btn:not(.edate-disabled):active,.edate-prev-btn:not(.edate-disabled):active,.edate-super-next-btn:not(.edate-disabled):active,.edate-super-prev-btn:not(.edate-disabled):active{color:var(--edate-arrow-hover-color,rgba(0,0,0,.88))}.edate-next-icon,.edate-prev-icon,.edate-super-next-icon,.edate-super-prev-icon{display:inline-flex;height:6px;position:relative;transform:rotate(-45deg);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:6px}.edate-next-icon:before,.edate-prev-icon:before,.edate-super-next-icon:before,.edate-super-prev-icon:before{inset-inline-start:0;top:0}.edate-next-icon:before,.edate-prev-icon:before,.edate-super-next-icon:after,.edate-super-next-icon:before,.edate-super-prev-icon:after,.edate-super-prev-icon:before{border:0 solid;border-block-end-width:0;border-block-start-width:1.5px;border-inline-end-width:0;border-inline-start-width:1.5px;content:"";display:inline-block;height:6px;position:absolute;width:6px}.edate-super-next-icon:after,.edate-super-prev-icon:after{left:-4px;top:-4px}.edate-next-icon,.edate-super-next-icon{transform:rotate(135deg)}.edate-footer{align-items:center;border-bottom:1px solid var(--edate-border-color,rgba(5,5,5,.06));border-left:1px solid var(--edate-border-color,rgba(5,5,5,.06));border-right:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;display:flex;height:var(--edate-footer-height,34px);justify-content:space-between;padding:4px 5px}.edate-btn-text,.edate-now,.edate-today{color:var(--edate-primary-color,#1677ff);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.edate-btn-text:not(.edate-disabled):active,.edate-now:not(.edate-disabled):active,.edate-today:not(.edate-disabled):active{opacity:.75}.edate-close-btn{align-items:center;cursor:pointer;font-size:24px}.edate-close-btn,.edate-close-btn .edate-close-icon{display:inline-flex}.edate-close-btn:active{color:var(--edate-close-color,#f05757)}.edate-btn-text{padding:2px 4px}.edate-btn-text.edate-disabled{color:var(--edate-disabled-color,rgba(0,0,0,.25))!important}.edate-btn{background-image:none;background:transparent;border:1px solid #d9d9d9;border-radius:2px;color:var(--edate-primary-color,#1677ff);cursor:pointer;display:inline-block;font-weight:400;height:20px;line-height:19px;min-width:32px;outline:none;padding:0 4px;position:relative;text-align:center;touch-action:manipulation;transition:all .2s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.edate-btn.edate-disabled{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important;border-color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;cursor:not-allowed!important}.edate-btn-primary{background-color:var(--edate-primary-color,#1677ff);border-color:var(--edate-primary-color,#1677ff);color:#fff}.edate-btn-primary:not(.edate-disabled):active{opacity:.75}.edate-disabled{cursor:not-allowed!important}.edate-disabled:before{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important}.edate-disabled:before,.edate-disabled>*{color:var(--edate-disabled-color,rgba(0,0,0,.25))!important;cursor:not-allowed!important}.edate-picker-date .emonth-container,.edate-picker-date .eyear-container,.edate-picker-month .ecalendar-container,.edate-picker-month .eyear-container,.edate-picker-year .ecalendar-container,.edate-picker-year .emonth-container{display:none}.epicker-mobile.edate-picker-container{border-radius:10px;overflow:hidden}.epicker-mobile.edate-picker-container .epicker-body{background-color:#fff;border-top-left-radius:10px;border-top-right-radius:10px;overflow:hidden;padding-bottom:15px}.epicker-mobile.edate-picker-container .epicker-body .edate-panel{border:none}.epicker-mobile.edate-picker-container .epicker-body .edate-header{border-bottom:none;height:44px}.ecalendar{box-sizing:border-box;cursor:unset;line-height:normal;margin:0;padding-left:0;text-align:left}.ecalendar-panel{border:1px solid var(--edate-border-color,rgba(5,5,5,.06));box-sizing:border-box;display:flex;flex-direction:column;width:100%}.ecalendar-body{box-sizing:border-box;color:var(--edate-default-color,rgba(0,0,0,.88));flex:1 1 auto;padding:6px 10px}.ecalendar-content{box-sizing:border-box;width:100%}.ecalendar-content th{height:30px}.ecalendar-content tr td{padding:3px 0}.ecalendar-content tr td:before{content:"";display:block;height:var(--edate-calendar-cell-height,24px);position:absolute;width:100%}.ecalendar-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.ecalendar-cell:not(.edate-disabled):hover .ecalendar-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.ecalendar-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.ecalendar-cell-in-view.ecalendar-cell-selected:not(.edate-disabled) .ecalendar-cell-inner{background-color:var(--edate-primary-color,#1677ff)!important;color:#fff}.ecalendar-cell-in-view.ecalendar-cell-selected:not(.edate-disabled) .ecalendar-badge{background-color:#fff}.ecalendar-cell-in-view.ecalendar-cell-selected.edate-disabled .ecalendar-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.25))}.ecalendar-cell-in-view.ecalendar-cell-today .ecalendar-cell-inner{border-color:var(--edate-primary-color,#1677ff)}.ecalendar-cell-in-view.ecalendar-cell-today.edate-disabled .ecalendar-cell-inner{border-color:var(--edate-disabled-bg-color,rgba(0,0,0,.25))}.ecalendar-cell-inner{align-items:center;border:1px solid transparent;border-radius:var(--edate-calendar-border-radius,2px);display:inline-flex;height:var(--edate-calendar-cell-height,26px);inset-inline-end:0;inset-inline-start:0;justify-content:center;line-height:var(--edate-calendar-cell-height,26px);padding:0;position:relative;transition:background .2s,border .2s;width:var(--edate-calendar-cell-width,26px);z-index:2}.ecalendar-cell .ecalendar-badge{background-color:var(--edate-primary-color,#1677ff);border-radius:50%;height:3px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(8px);width:3px;z-index:3}.ecalendar-cell.edate-disabled .ecalendar-badge{background-color:var(--edate-disabled-color,rgba(0,0,0,.25))}.epicker-mobile .ecalendar-content tr td{padding:8px 0}.emonth{cursor:unset;line-height:normal}.emonth-panel{background-color:#fff;border:1px solid var(--edate-border-color,rgba(5,5,5,.06));display:flex;flex-direction:column}.emonth-panel .emonth-body{padding:1px 8px}.emonth-panel table{width:100%}.emonth-panel .emonth-cell{height:52px}.emonth-panel .emonth-cell-inner{padding:0 8px}.emonth-body{color:var(--edate-default-color,rgba(0,0,0,.88));padding:0 10px}.emonth-content{width:100%}.emonth-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.emonth-cell:not(.edate-disabled):hover .emonth-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.emonth-cell:before{content:"";height:22px;inset-inline-end:0;inset-inline-start:0;position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;z-index:1}.emonth-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.emonth-cell-in-view.emonth-cell-selected:not(.edate-disabled) .emonth-cell-inner{background-color:var(--edate-primary-color,#1677ff)!important;color:#fff}.emonth-cell-in-view.emonth-cell-selected.edate-disabled .emonth-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))!important}.emonth-cell-inner{border-radius:var(--edate-border-radius,2px);display:inline-block;height:22px;line-height:22px;min-width:22px;position:relative;transition:background .2s,border .2s;z-index:2}:root{--edate-header-height:34px;--edate-footer-height:var(--edate-header-height,34px);--edate-font-size:14px;--edate-default-color:rgba(0,0,0,.88);--edate-primary-color:#648ffc;--edate-hover-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-hover-bg-color:rgba(0,0,0,.04);--edate-active-color:var(--edate-default-color,rgba(0,0,0,.88));--edate-active-bg-color:#e6f4ff;--edate-disabled-color:rgba(0,0,0,.25);--edate-disabled-bg-color:rgba(0,0,0,.04);--edate-disabled-active-bg-color:rgba(0,0,0,.25);--edate-border-color:rgba(5,5,5,.06);--edate-border-radius:2px;--edate-close-color:#f05757;--edate-calendar-border-radius:50%;--edate-calendar-cell-width:26px;--edate-calendar-cell-height:26px;--edate-badge-color:var(--edate-primary-color,#648ffc);--edate-arrow-color:rgba(0,0,0,.45);--edate-arrow-hover-color:var(--edate-default-color,rgba(0,0,0,.88))}.eyear{cursor:unset;line-height:normal}.eyear-layout{align-items:stretch;display:flex;flex-wrap:nowrap}.eyear-panel{background-color:#fff;border:1px solid var(--edate-border-color,rgba(5,5,5,.06));display:flex;flex-direction:column}.eyear-panel .eyear-body{padding:1px 8px}.eyear-panel table{width:100%}.eyear-panel .eyear-cell{height:52px}.eyear-panel .eyear-cell-inner{padding:0 8px}.eyear-body{padding:0 10px}.eyear-cell{box-sizing:border-box;color:rgba(0,0,0,.25);cursor:pointer;padding:0;position:relative;text-align:center}.eyear-cell:not(.edate-disabled):hover .eyear-cell-inner{background-color:var(--edate-hover-bg-color,rgba(0,0,0,.04))}.eyear-cell:before{content:"";height:22px;inset-inline-end:0;inset-inline-start:0;position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;z-index:1}.eyear-cell-in-view{color:var(--edate-default-color,rgba(0,0,0,.88))}.eyear-cell-in-view.eyear-cell-selected:not(.edate-disabled) .eyear-cell-inner{background-color:var(--edate-primary-color,#1677ff);color:#fff}.eyear-cell-in-view.eyear-cell-selected.edate-disabled .eyear-cell-inner{background-color:var(--edate-disabled-bg-color,rgba(0,0,0,.04))}.eyear-cell-inner{border-radius:var(--data-picker-border-radius,2px);display:inline-block;height:22px;line-height:22px;min-width:22px;position:relative;transition:background .2s,border .2s;z-index:2}
|
package/dist/style.js
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/control-date-picker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-beta.2",
|
|
4
4
|
"description": "date picker control for ezviz",
|
|
5
5
|
"title": "date-picker",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"dev": "cross-env NODE_ENV=development rollup --config rollup.config.mjs --watch",
|
|
10
|
-
"build": "npm run clean && cross-env NODE_ENV=production rollup --config rollup.config.mjs && npm run docs",
|
|
11
|
-
"clean": "rimraf dist",
|
|
12
|
-
"types": "tsc src/index.ts --emitDeclarationOnly --declaration --declarationDir dist/types --esModuleInterop",
|
|
13
|
-
"docs": "typedoc --tsconfig typedoc.config.js"
|
|
14
|
-
},
|
|
15
8
|
"files": [
|
|
16
9
|
"dist"
|
|
17
10
|
],
|
|
@@ -31,11 +24,16 @@
|
|
|
31
24
|
"@ezuikit/utils-i18n": "2.0.0",
|
|
32
25
|
"@skax/delegate": "4.0.2"
|
|
33
26
|
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@common/rollup": "workspace:*"
|
|
36
|
-
},
|
|
37
27
|
"publishConfig": {
|
|
38
28
|
"access": "public",
|
|
39
29
|
"registry": "https://registry.npmjs.org/"
|
|
40
|
-
}
|
|
41
|
-
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/Ezviz-OpenBiz/EZUIKit-player-controls.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-controls/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-controls#readme"
|
|
39
|
+
}
|