简体   繁体   中英

Vue 3 date picker with browser build?

Is there a Vue 3 datepicker with a browser build (ie, which I can simply use from a CDN)? I have a Vue 2 application which doesn't use bundling, which has been using vuejs-datepicker. I'm now trying to upgrade to Vue 3, but vuejs-datepicker breaks under Vue 3. There is a Vue 3 replacement ( https://icehaunter.github.io/vue3-datepicker/ ), but it doesn't have a browser build.

Hi it might be a bit late but you can use

https://vue3datepicker.com/ in the browser.

Of course you dont have to import in your main js but you do need to include it as a component like this:

Datepicker: VueDatePicker,

then you will be able to use it like this:

<Datepicker id=""><Datepicker>
<DatePicker v-model="date"  textinput :maxDate="new Date()" ref="date"
 id="@Html.IdFor(m => ""name="@Html.NameFor(m => m.Customer.DateOfBirth)"
  value="@(Model.Customer.DateOfBirth?.ToString("d"))"
  ></DatePicker>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM