How to get the value of a datepicker using framework7 and vuejs?

I have the following component:

label=“Fecha de nacimiento”
placeholder=“Selecciona una fecha”
@input=“perfil.fecha_nacimiento = $”

<f7-button class=“button button-big button-fill”

            return {
                perfil: {
                    fecha_nacimiento: ''
            let vm = this;
            console.log(perfil); //When printing in console, profile, birthdate, this gap.


but when I get the information of the birthdate, I can not get it.

I have the exactly same issue!

I’ve tried everything and I cannot get its value…

In this documentation it says that the value type is an array.

I’ve tried doing @input=“myValue.push($” but it did not work either.

@jggj did you find the solution?
Please, if someone know the solution post it here.

To get correct calendar Date values array, you need to listen for @calendar:change event instead

type="datepicker" @calendar:change="(values) => myValue.push(...values)"

I am doing the following:

                        label="Fecha de nacimiento"
                        placeholder="Selecciona una fecha"
                        @input="perfil.fecha_nacimiento = $"

            let vm = this;
            let fecha = new Date(e);
            vm.perfil.fecha_nacimiento = fecha.getTime();            

but I get the following error:

[Vue warn]: Error in callback for watcher “props.value”: “TypeError: is not a function”

Check ListInput docs about value property, it must be an Array with date. And you shouldn’t use @input here, just value + @calendar:change

1 Like

Thank you very much I already get the value I only have this error

Estimated with a query, it will be that there are certain calendar numbers that do not select them, for example from 9 to 20 do not select them in this image. the other numbers if you select them. But checking see that it is in this section where the red box is where you do not select, so with the other months of the calendar


      label="Fecha de nacimiento"
      placeholder="Selecciona una fecha"
      :value="[new Date(perfil.fecha_nacimiento)]"

parametrosCalendario: {
                openIn: 'customModal', 
                header: true, 
                footer: true, 
                dateFormat: 'MM dd yyyy', 
                monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto' , 'Septiembre' , 'Octubre', 'Noviembre', 'Diciembre'], 
                dayNamesShort:['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],
                toolbarCloseText: "Aceptar"

Reviewing I see that it is a problem that dialog was not closed, what could that dialogue error be ?, I currently close it this way.

initialize: vm.$f7.dialog.preloader('Cargando');
close: vm.$f7.dialog.close();

but as you will see, it stays there

That is weird. Are you on very latest version of F7?