Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

QUESTION - Show modal with hidden input field #238

Open
radud opened this issue Oct 18, 2020 · 2 comments
Open

QUESTION - Show modal with hidden input field #238

radud opened this issue Oct 18, 2020 · 2 comments

Comments

@radud
Copy link

radud commented Oct 18, 2020

Description:

Hi there,
Thank you for this awesome component!

This is not an issue. Is a question.

Is there a way to use a hidden input and show picker using event?

Many thanks,
Radu

@radud radud changed the title Show modal with hidden input field QUESTION - Show modal with hidden input field Oct 19, 2020
@mofolo
Copy link

mofolo commented Nov 15, 2020

Hey Radud,

I managed to do this using Vue's ref.

You can do something like this

HTML

<datetime v-model="pageDateString"  
    input-class="d-none" 
     type="date" 
     :max-datetime="maxDate" 
     ref="dateSelector"></datetime>
<a class="page-link" @click="dateSelector">Button</a>

JS

dateSelector()
 {
    this.$refs.dateSelector.isOpen = true
}

The .class d-none is bootstrap 4 which applies: display:none to the input.

@tripflex
Copy link

https://github.com/tripflex/vue-datetime my fork adds an argument to not use the input

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants