The time selector does not appear in the v-date-picker widget

I need help figuring out how to select a time range using v-date-picker on vCalender within my Vuetify project. Despite setting the mode of v-date-picker to dateTime, I am unable to find an option to choose the time along with the date. Is there something incorrect in my approach or implementation?

my-template

      <div>
              <div class="flex mb-2">
                <label class="text-gray-600 font-medium"><input class="mr-1" type="radio" value="" v-model="timezone" />Local</label>
                <label class="text-gray-600 font-medium ml-3"><input class="mr-1" type="radio" value="utc" v-model="timezone" />UTC</label>
              </div>
              <v-date-picker v-model="date" multiple :timezone="timezone" mode="dateTime" />
            </div>

my data:

date: new Date(),
timezone: '',

Answer №1

UPDATE:

The issue appears to stem from a conflict where both components are named v-date-picker, with the Vuetify's component taking precedence by default. If you're looking to incorporate both components in your application, refer to this resolved matter on Github:

Referencing a statement made by the creator of Vcalendar; nathanreyes within the Github discussion:

You have the ability to define a componentPrefix option when utilizing VCalendar.

Vue.use(VCalendar, {
  componentPrefix: 'vc'
})

Subsequently, use it in the template like so

<template>
  <vc-calendar>
  </vc-calendar>
</template>

Previous response below was before the question was modified for better clarity about the issue.


Notably, there isn't an available mode parameter in the v-date-picker API. Nevertheless, there is a type attribute, but it exclusively supports either "date" for date selection or "month" for selecting months.

An alternative could be to explore the vuetify-datetime-picker extension for Vuetify as suggested in a response to this query. Credit goes to @Jeanpaul1304.

Answer №2

    To resolve the issue, we can adjust the Vue code by utilizing VCalendar with a custom componentPrefix of 'vc'. This way, we will use vc-calendar and vc-date-picker instead.

An error is occurring due to conflicting names between vuetify components. To fix this, we must update the main js file to switch from using v-data-picker to vc-data-picker.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having difficulty accessing a PHP ajax post request

I've scoured every resource but can't seem to find a solution to this issue. I'm in the process of writing an ajax script, however, I am struggling to retrieve the correct value from the POST request. Here is the code I have so far: <t ...

Struggles with fading in and out

I'm currently working on enhancing a pure CSS rollover with a smooth transition/fade effect, but I'm encountering some difficulties in achieving the desired outcome. The concept involves displaying a new div called "online-hover" when hovering o ...

Solving Issues with URL Parameters and AJAX

My JSP page has a JavaScript function called loadData() that is triggered when the page loads. This function makes an AJAX request to a servlet in order to retrieve data and return the necessary HTML content to display on the page. I am trying to call thi ...

"Triggering an event after selecting and opening a file with an input of type file

Check out this snippet of HTML code: <input type="file" id="mysignature_upload" onChange="readURL();"/> We also have some Javascript code: function readURL(){ alert("Hello"); } A potential issue with this code is that the function readURL is on ...

The function 'create' is not a recognized property within the 'Completions' type

Recently, I've been experimenting with ChatGPT and have just installed the latest version 4.8.0. My current project is built on NextJS. Prior to this, I successfully completed a project using v3.something last month, but I'm encountering diffic ...

Prevent the mouseup event in jQuery when the mouse has previously been moved

I have a div with a row of span buttons displayed horizontally. Since there are too many buttons to fit on the screen, I want to enable the user to click and drag the entire row of buttons. However, my challenge is to ensure that the button's mouseup ...

AngularJS: splitting the parent <div> into multiple sections every nth element

I have an array of strings in Javascript and I am attempting to use AngularJS to create nested <div> elements. var arr = ["abc", "def", "ghi", "jkl", "mno", "pqr", "stu"]; My goal is to group every 3 elements together like so. <div class="pare ...

Ways to address Path Traversal vulnerability in the following code

const downloadFile = blobstoreRouter.get('/blobstore/download/:filename', (req, res) => { var localFile = path.join(__dirname, '..', escape(req.params.filename)); var file = require('fs').createWriteStream(localFile); try { ...

Utilize Vue and JSON to dynamically fill select options based on another select input

Seeking assistance in developing a dynamic search form with select options for Districts, Regions and locations. The Regions selection should be populated based on the selected District, and the Locations based on the chosen Region. The data is structured ...

Find the nearest element with a specific class using jQuery

I am currently using jQuery version 1.12.4 for the purpose of retrieving the value from the closest element with a specific class selector. Unfortunately, I am encountering difficulty in selecting the closest element as desired. $(function() { $("[cla ...

Is it possible to deinitialize data tables (remove from memory)?

I'm currently utilizing data-tables (with jQuery) on my website. The particular data-table I have implemented seems to be consuming excessive memory in javascript, causing a slowdown in other functionalities. Is there a way for me to de-initialize th ...

Vue.js - Maintaining input value when model declines updates

I am working on a text input that allows users to enter numbers with a maximum of three digits after the decimal point: <v-text-field type="text" :value="num" @change="changeNum($event)" /> <p>{{ num }}</p> ... export default { data: ...

The npm error message states: "Unable to locate the 'readable-stream' module."

Recently, I installed node js on my Windows 10 machine with version v4.4.2. However, whenever I attempt to run npm install or check npm version, it throws the following error message. Any assistance on this matter would be highly appreciated. Error: Canno ...

Is it possible to export data to an Excel file from a Vuetify data table?

I'm attempting to extract simulated data directly from a datatable without using an API. However, I haven't been able to find any examples demonstrating how to do this. ...

Show various error messages depending on the type of error detected

When pulling data from an API, my goal is to handle errors appropriately by displaying custom error messages based on the type of error that occurs. If the response is not okay, I want to throw an error and show its message. However, if there is a network ...

Is it possible to modify @page directive(CSS) values from the code-behind(C#) or JavaScript?

Using the @page directive, you can define the printer margins for a page separately from regular CSS margins: <style type="text/css" media="print"> @page { size: auto; /* auto is the current printer page size */ margin ...

How can I retrieve text instead of HTML using jQuery.get?

I'm facing an issue where I am trying to retrieve data from another site using the code below: jQuery.ajaxSetup({ crossDomain: true, dataType: "jsonp text" }); jQuery.get(url, function(rawContent) { console.log(rawContent); }); However, ...

Not all dynamic content is loaded through Ajax requests on a single domain

I currently have my domain forwarded (cloaked) to The main page (index.html) utilizes Ajax for loading content. All content loads properly at the original host (moppy.co.uk/wtcdi). However, on the forwarded domain (whatthecatdragged.in), some content fai ...

Issue encountered during production mode compilation: "Vue Laravel Mix" is not a valid function

I'm working on a Laravel, VueJs, VueRouter, Vuex application that utilizes Webpack for compiling assets. Here's my package.json file: { "private": true, "scripts": { "dev": "npm run development", "development": "cross-env ...

Google Chrome successfully transmits two variables with AJAX, whereas Mozilla Firefox does not send them

Having an issue with sending two values through ajax - currently only one value is being sent in Mozilla browser. Ajax script: $('#post_submit').click(function() { event.preventDefault(); var great_id = $("#post_container_supreme:first").attr(" ...