How to add DatePicker in NuxtJS ? Last Updated : 26 Jul, 2024 Comments Improve Suggest changes Like Article Like Report In this article, we are going to learn how we can add a Datepicker in NuxtJs. Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack, and Babel.js. Nuxt is inspired by Next.js, which is a framework of similar purpose, based on React.js.Approach: To add our DatePicker we are going to use the vuejs-datepicker package. The vuejs-datepicker package helps us to add a DatePicker anywhere in our app. So first, we will install the vuejs-datepicker package and then we will create a vue-datepicker.js file in our plugins folder then we will add the datepicker in our app.Create NuxtJS Application: You can create a new NuxtJs project using the below command:npx create-nuxt-app gfgInstall the required package: Now we will install the vuejs-datepicker package using the below command:npm i vuejs-datepickerProject Structure: It will look like thisAdding the DatePicker: To add our datepicker, we have to follow the below steps:Step 1: Create a new file with the name 'vue-datepicker.js' inside the plugins folder. After creating the file add the below content in the file. JavaScript import Vue from 'vue' import Datepicker from 'vuejs-datepicker' Vue.component('date-picker', Datepicker) Step 2: Inside the nuxt.config.js file add the below line inside the plugins section: nuxt.config.js plugins: [ '@/plugins/view-ui', { src: '~/plugins/vue-datepicker', ssr: false }, ], Step 3: Now to add the DatePicker inside our app add the below lines inside the index.vue file in pages folder. index.vue <template> <div> <h4>GeeksforGeeks - NuxtJs DatePicker</h4> <client-only> <date-picker placeholder="MM/DD/YYYY" format="MM/dd/yyyy" v-model="date_today" /> </client-only> </div> </template> <script> export default { data() { return { date_today:new Date() } } } </script> Explanation: In the above example first, we created the vue-datepicker file in the plugin folder and added the path in nuxt.config.js file. Now we can use the datepicker package anywhere in our app. To add the datepicker we used the <date-picker> component in our index.vue file. Â Steps to run the application: Run the below command in the terminal to run the app.npm run devOutput: Comment More infoAdvertise with us Next Article How to add DatePicker in NuxtJS ? I imranalam21510 Follow Improve Article Tags : JavaScript Web Technologies Node.js Vue.JS Nuxt.js +1 More Similar Reads How to Add Simple DatePicker in Next.js ? In this article, we are going to learn how we can add a Simple Datepicker in NextJs. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac. The linking of dynamic paths helps in rendering your NextJS components 2 min read How to set year in DatePicker ? In this article, we are going to learn about the Datepicker in jQuery. In many forms, you can select the date and year from the calendar. Datepicker is a standard form of the input field that is used to select the date and year by just seeing the calendar. It is an interactive calendar in a specifie 2 min read How to add Calendar in Next.js ? Adding a calendar to a Next.js application enhances scheduling and event management. We can just install and use the available npm package. In this article, we are going to learn how we can add a calendar loader in NextJS.ApproachTo add our calendar we are going to use the react-calendar package. Th 2 min read How to setting up Datepicker in Bootstrap ? A Datepicker is an input tool that allows users to select dates from a calendar view rather than typing manually. To set it up in Bootstrap, integrate the Bootstrap Datepicker library using HTML, CSS, jQuery, and Bootstrap, customizing it with various options for functionality.Datepicker In FormsSyn 3 min read How to Display Time in NuxtJS ? In this article, we are going to learn how we can show time in NuxtJs. Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack, and Babel.js. Nuxt is inspired by Next.js, which is a framework of similar purpose, based on React.js. Approach: To show time in nuxtj 2 min read How to create Calendar in ReactJS ? Creating a calendar in React JS can help in React projects like to-do lists, e-commerce sites, Ticket booking sites, and many more apps. It visualizes the day, month, and year data and makes an interacting User interface.PrerequisitesReact JSNode.js & NPMTo create a calendar in React JS we will 2 min read How to create Date Picker in ReactJS? Date pickers provide a simple way to select a single value from a pre-determined set. Material UI for React has this component available for us and it is very easy to integrate. We can create a Date Picker in ReactJS using the following approach:Creating React Application And Installing Module:Step 2 min read React Suite DatePicker Show time React suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application. In this article, weâll learn about React suite DatePicker Showtim 2 min read How to create UI Datepicker using jQuery? To implement a jQuery UI Datepicker with localization, configure it to display dates in various languages based on either browser settings or application-specific preferences. Syntax:let userLang = navigator.language || navigator.userLanguage; let options = $.extend({}, // empty object $.datepicker. 2 min read jQuery UI Datepicker altField Option jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery UI datepickers widget allow users to enter dates easily and visually. In this article, we will see how to use altField option 1 min read Like