Coder Social home page Coder Social logo

Min and Max dates not working about mat-datetimepicker HOT 4 OPEN

 avatar commented on July 26, 2024
Min and Max dates not working

from mat-datetimepicker.

Comments (4)

jcanning avatar jcanning commented on July 26, 2024 1

@stephanec I think it has to be applied to the input field not the mat-dattimepicker field

from mat-datetimepicker.

kuhnroyal avatar kuhnroyal commented on July 26, 2024

Make sure the date is of the correct type moment/date. There are examples in the repository.
#34

from mat-datetimepicker.

kuhnroyal avatar kuhnroyal commented on July 26, 2024

Is this still an issue or did you solve your problem?

from mat-datetimepicker.

scastrec avatar scastrec commented on July 26, 2024

Hi.
Looks like I'm having the same issue.
Everythings works great until i add [min]

The Angular error:

Can't bind to 'min' since it isn't a known property of 'mat-datetimepicker'.

  1. If 'mat-datetimepicker' is an Angular component and it has 'min' input, then verify that it is part of this module.

My HTML
`

    <mat-datetimepicker-toggle [for]="datePicker" matSuffix></mat-datetimepicker-toggle>
    <mat-datetimepicker [min]="startDate" #datePicker type="date" openOnFocus="true"></mat-datetimepicker>
    <input matInput [matDatetimepicker]="datePicker" formControlName="DateBegin" required autocomplete="false" >

`

And in my component :
startDate = moment();

I'm currently using the 2.0.1 version.

from mat-datetimepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.