PageSourceSearch

https://publisher.tonic.com/assets/TonicDatePickers.ba47542a.js

js tonic.com collected 2026-10-02 11:07:39 UTC 3,908 bytes, 2 lines download raw bytes

1import{_ as v,d as y,r as b,ds as n,o as f,f as C,w as V,b as e,j as o,h as r,e as a,aP as d,t as i,dO as D}from"./index.6ebb0f0b.js";const k={class:"content"},w={class:"row no-wrap justify-between"},O={class:"col-md-6"},U={class:"col-md-6"},T={class:"row"},M={class:"col-6"},P={class:"row"},S={class:"col-6"},Y={class:"col-6"},g=y({__name:"TonicDatePickers",setup(x){const t=b({yesterday:{value:n().subtract(1,"days")},lastMonth:{current:null,value:{from:n().subtract(1,"months").startOf("month"),to:n().subtract(1,"months").endOf("month")}},customChipChoice:{current:null,value:n().startOf("year"),templates:[{label:"Christmas",value:"2021-12-24"},{label:"Butterfly lifetime",value:{from:"2020-05-05",to:"2020-05-08"}},{value:null,label:"More options...",subItems:[{label:"February",value:"2022-02-01"},{label:"Wish Vacation",value:{from:"2020-05-01",to:"2020-05-31"}},{label:"My first day ad TI",value:"2020-11-01"}]}]},disabledDays:{current:null,value:"2022-05-02",options:["2022/05/02","2022/05/05","2022/05/10","2022/05/11","2022/05/17","2022/05/18","2022/05/23","2022/05/26"]},firstOfYear:{current:null,value:n().startOf("year")}}),u=function(p,l){t[p].current=l},m=function(p){for(let l in t)t[l].value="2022-05-05",t[l].value={from:n().subtract(13,"days"),to:n()}};return(p,l)=>(f(),C(a(D),{name:"date_picker",dark:null},{default:V(()=>[e("div",k,[l[28]||(l[28]=e("h3",null,"Date Picker",-1)),e("button",{onClick:m},"Set 2-week range everywhere"),e("div",w,[e("div",O,[l[12]||(l[12]=e("h6",null,"Yesterday preselected",-1)),l[13]||(l[13]=e("p",null,[o("Yesterday preselected. The user "),e("b",null,"may not"),o(" select a date range manually")],-1)),r(a(d),{modelValue:t.yesterday.value,"onUpdate:modelValue":l[0]||(l[0]=s=>t.yesterday.value=s),"onUpdate:date":l[1]||(l[1]=s=>u("yesterday",s))},null,8,["modelValue"]),e("p",null,[l[10]||(l[10]=e("br",null,null,-1)),l[11]||(l[11]=e("b",null,"Selection: ",-1)),o(i(t.yesterday.current),1)])]),e("div",U,[l[16]||(l[16]=e("h6",null,"Last month preselected",-1)),l[17]||(l[17]=e("p",null,[o("Last month is preselected. The user "),e("b",null,"may"),o(" select a date range manually")],-1)),r(a(d),{range:"",modelValue:t.lastMonth.value,"onUpdate:modelValue":l[2]||(l[2]=s=>t.lastMonth.value=s),"onUpdate:date":l[3]||(l[3]=s=>u("lastMonth",s))},null,8,["modelValue"]),e("p",null,[l[14]||(l[14]=e("br",null,null,-1)),l[15]||(l[15]=e("b",null,"Selection: ",-1)),o(i(t.lastMonth.current),1)])])]),e("div",T,[e("div",M,[l[20]||(l[20]=e("h6",null,"Custom Chip Choice",-1)),l[21]||(l[21]=e("p",null,"We may pass custom date templates",-1)),r(a(d),{modelValue:t.customChipChoice.value,"onUpdate:modelValue":l[4]||(l[4]=s=>t.customChipChoice.value=s),templates:t.customChipChoice.templates,"onUpdate:date":l[5]||(l[5]=s=>u("customChipChoice",s))},null,8,["modelValue","templates"]),e("p",null,[l[18]||(l[18]=e("br",null,null,-1)),l[19]||(l[19]=e("b",null,"Selection: ",-1)),o(i(t.customChipChoice.current),1)])])]),e("div",P,[e("div",S,[l[24]||(l[24]=e("h6",null,"No Chip Choice",-1)),r(a(d),{modelValue:t.firstOfYear.value,"onUpdate:modelValue":l[6]||(l[6]=s=>t.firstOfYear.value=s),"no-templates":!0,"onUpdate:date":l[7]||(l[7]=s=>u("firstOfYear",s))},null,8,["modelValue"]),e("p",null,[l[22]||(l[22]=e("br",null,null,-1)),l[23]||(l[23]=e("b",null,"Selection: ",-1)),o(i(t.firstOfYear.current),1)])]),e("div",Y,[l[27]||(l[27]=e("h6",null,"Disabled days",-1)),r(a(d),{modelValue:t.disabledDays.value,"onUpdate:modelValue":l[8]||(l[8]=s=>t.disabledDays.value=s),"no-templates":!0,options:t.disabledDays.options,"onUpdate:date":l[9]||(l[9]=s=>u("disabledDays",s))},null,8,["modelValue","options"]),e("p",null,[l[25]||(l[25]=e("br",null,null,-1)),l[26]||(l[26]=e("b",null,"Selection: ",-1)),o(i(t.disabledDays.current),1)])])])])]),_:1}))}});var N=v(g,[["__scopeId","data-v-c0481fc4"]]);export{N as default};
2//# sourceMappingURL=TonicDatePickers.ba47542a.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.