What is the best way to configure a row layout in a Vuetify dialog component?

Encountering a layout issue. Here is the problem:

https://codepen.io/positivethinking639/pen/YzzwYZq.

When the dialog pops up, it appears strange because the width of the

row(<v-row justify="center">
) is larger than the width of the dialog, resulting in two shadows being seen.

My goal is to make the width of the row(<v-row justify="center">) match with the width of the dialog.

I have attempted to solve this but haven't found a solution yet. Any help would be appreciated.

Answer №1

configure your dialogue to automatically adjust its width

.v-dialog {
 width:unset;
}

ensure there are no gutters in your row layout

<v-row no-gutters justify="center">

apply padding on the right side of your column and eliminate the row=2 attribute

<v-col class='px-3' v-show="foo.date !== null" 

Answer №2

utilize v-card within v-col components

<div id="app">
    <v-app>
      <v-content>
        <v-container>
          <v-dialog
            v-for="item in items"
            :key="item.id"
            :close-on-content-click="false"
            transition="scale-transition"
            :return-value.sync="item.date"
            max-width="500px"
            min-width="500px"
            v-model="modal[item.id]"
            :ref="'dialog' + item.id"
          >
            <template v-slot:activator="{ on }">
              <v-btn color="success" dark v-on="on">select date {{item.id}} {{ item.date }}</v-btn>
            </template>
            <v-card class="py-2">
              <v-card-text>
                <v-row justify="center" no-gutters align-content="center">
                  <v-col md="auto" justify-self="center">
                    <v-date-picker v-model="item.date" @input="handleDateChange">
                      <div class="flex-grow-1"></div>
                      <v-btn text color="primary" @click="modal[item.id] = false">Cancel</v-btn>
                      <v-btn text color="primary" @click="$refs['dialog' + item.id][0].save(item.date)">OK</v-btn>
                    </v-date-picker>
                  </v-col>
                  <v-slide-y-transition>
                    <v-col
                      sm="3"
                      xs="12"
                      v-show="item.date !== null"
                      :style="{'background-color':'white'}"
                    >
                      <template v-for="time in allowedTimes">
                        <v-btn
                          @click="setTime(time)"
                          class="my-2"
                          :outlined="time !== selectedTime"
                          block
                          x-large
                          color="primary"
                        >{{ time }}</v-btn>
                      </template>
                    </v-col>
                  </v-slide-y-transition>
                </v-row>
              </v-card-text>
            </v-card>
          </v-dialog>
        </v-container>
      </v-content>
    </v-app>
  </div>

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

The width of the TD element does not affect the grid

<div id="unique-example" class="k-unique-content"> <table id="unique-grid" style="float: left; position: relative"> <thead> <tr> <th width ="410px"data-field="UniqueFileName">Unique File Name ...

What is the best way to upload this file in VueJS?

I've come across a file written in outdated syntax that I need to use in a VueJS Component. You can find the file here. For instance, consider these snippets from the file: var CCC = CCC || {}; CCC.STATIC = CCC.STATIC || {}; CCC.STATIC.TYPE = { & ...

What is the reason for the omission of H1 tags from the table of contents list in NuxtJS's Content module?

Currently, I am facing an issue with importing a large amount of markdown content that heavily utilizes H1 (#) tags. While trying to create a table of contents (TOC) component, I noticed that the @Nuxt/Content package does not include H1 tags in the provid ...

Is there a way to ensure that a div automatically moves below the main div when it reaches its full length?

I am facing an issue with a foreach statement in jQuery where I am generating Bootstrap cards for each product in a list. The problem arises when attempting to create multiple cards in a row, as the width of the cards becomes too small for the content. I ...

The functionality of min-height in CSS seems to be malfunctioning

One of my HTML elements has a parent with the ID #out, and a child with the ID #in. The parent is positioned absolutely, with a minimum height of 100%. It seems to be functioning correctly in most browsers, except when I also set the child's min-heigh ...

Vue: Error - Unable to execute _vm.myFunction as it is not a function

I'm currently working on adding a basic button to a .vue file that will log a message to the console. Here's the code I have so far: <template> <div> <button v-on:click="sayHello()">Click me</button> < ...

Enhance your UI experience with a beautifully styled button using Material-

I was using a Material UI button with a purple background. <Button component={Link} to={link} style={{ background: '#6c74cc', borderRadius: 3, border: 0, color: 'white', heig ...

Issue with host-context scss rules not appearing in final production version

I am facing an issue in my Angular project where the scss rules that define how components should look when within the context of another component are not being applied when I build for production and put it live. Here is an example: :host-context(my-tabl ...

endless cycle of scrolling for div tags

My goal is to incorporate a tweet scroller on I believe it uses the tweet-scroller from Unfortunately, this link seems broken as the demo is not functioning. I searched for an alternative solution and came across http://jsfiddle.net/doktormolle/4c5tt/ ...

VueJS consistently adds a sharp sign (#/) to the end of URL for all pages automatically

I have successfully integrated VueJS into my website, but I am noticing that the URL always ends with /#. Is there a way to remove it? For example, how can I change from: www.noti-solutions.com/#/ to: www.noti-solutions.com ...

Image not showing correctly after closing the bootstrap modal

I am currently working on creating a gallery with hover effects for each image, similar to the one found here. My goal is to have a Bootstrap modal open when I click on a link within the hovered image, displaying additional content. Everything seems to be ...

Achieve a full-height sidebar design similar to Wordpress using flexbox functionality

Working on a web app that features a tools sidebar with a fixed width requirement amidst fluid content. Explored using flexbox to achieve this, but encountered an issue where the main box only takes the height of the viewport instead of the entire site&ap ...

Utilizing CSS to set a map as the background or projecting an equirectangular map in the backdrop

How can I set an equirectangular projection like the one in this example http://bl.ocks.org/mbostock/3757119 as a background for only the chart above the X-axis? Alternatively, is it possible to use an image of a map as a CSS background instead? .grid . ...

Having trouble displaying DIV Content with CSS through printing

<script type="text/javascript"> function PrintElem(elem) { Popup($(elem).html()); } function Popup(data) { var mywindow = window.open('', 'mydiv', 'height=550,width=750'); mywindow.doc ...

Center the p tag vertically

To ensure the text inside the p tag aligns vertically in the middle, I've set a specific height for the tag. While this works perfectly for single-line text, it shifts to the top of the p tag when there are two lines of text. It's important to k ...

Learn how to toggle the visibility of multiple divs using Vuejs and the @click directive. Perfect for those who

I'm struggling with figuring out how to toggle the visibility of 3 different divs based on a click event. Although I've managed to show and hide 2 divs using v-show, I believe v-show doesn't work for more than 2 divs. Here's my code w ...

Unable to implement CSS styling on Bootstrap collapsible menu

When you visit this website and resize the browser window to reveal the toggle buttons, clicking on either one will only expand the dropdowns to a small portion of the screen width. I would like both dropdowns to stretch out and fill 100% of the available ...

I am having trouble getting two similar Javascript codes to function simultaneously

Using a common JavaScript code, I am able to display a div when a certain value is selected. http://jsfiddle.net/FvMYz/ $(function() { $('#craft').change(function(){ $('.colors').hide(); $('#' + $(this ...

Experience the full power of the bootstrap grid system with a unique feature: nested overflow-y scrolling

Struggling with the bootstrap grid and a nested div with overflow-y. I followed advice from this stack overflow post, attempting to add min-height:0 to the parent ancestor, but can't seem to make it work. View screenshot here - Chrome on the left, Fi ...

Transform shapefiles to geojson format using OpenLayers 5

As I embark on a new project that involves combining Vue.js and OpenLayers, I am thoroughly enjoying the process. While I have successfully implemented various functionalities like drawing, reading, and modifying vectors, I find myself stuck when it comes ...