Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add minDate #314

Open
chaituValKanO opened this issue Dec 8, 2016 · 6 comments
Open

Unable to add minDate #314

chaituValKanO opened this issue Dec 8, 2016 · 6 comments

Comments

@chaituValKanO
Copy link

I am trying to ad min date(using new Date()) to my calendar, but its not reflecting. My html tag is
.

in JS file i have initialized minDate = new Date() and startDate = new Date(). The start date is shown in the input tag but minDate is not working. Am i missing something?

I have included angular-datepicker/dist/index.js and angular-datepicker/dist/index.css.

@cjk101812
Copy link

TypeError: date.format is not a function
at setMin (http://localhost:3000/bower_components/angular-datepicker/dist/angular-datepicker.js:748:37)
at link (http://localhost:3000/bower_components/angular-datepicker/dist/angular-datepicker.js:762:9)

@KumarGeoSpark
Copy link

I also need help with this

@davidda
Copy link

davidda commented Dec 27, 2016

You'll have to post the html tag and relevant excerpts from your controller in order to see what is going on.

@brunowego
Copy link

Just do something like this:

$scope.dates = {
  minDate: this.moment().add(31, 'minutes'),
  maxDate: this.moment().add(1, 'month'),
};
input.form-input(type='text', name='scheduled_at', ng-model='item.scheduled_at', date-time, min-date='dates.minDate', max-date='dates.maxDate', validation='required')

@KumarGeoSpark
Copy link

KumarGeoSpark commented Dec 29, 2016 via email

@biswajitpanday
Copy link

Use moment(). This is must.
$scope.minDate = { moment() }
<input type="datetime" date-time ng-model="minDate" view="date" auto-close="true" min-view="date" format="ddd, MMM DD, YYYY" min-date="minDate">

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

No branches or pull requests

6 participants