Comments (13)
Hi @Dancia, minimum and maximum dates must have the same format
of the model.
<div moment-picker="myDate"
locale="en"
format="HH:ii"
min-view="day"
min-date="'09:00'"
max-date="'18:00'">
</div>
You can also check out this plunker to better realize how it works.
Hope this helps! :)
from angular-moment-picker.
Hi @indrimuska ,
I have min date and max date fields,
my question is how do i disable future dates in min-date? keeping current date as the max date.
the same should be in max date as well
my code:
please help me out on this ,examples with code or plunker would be really great help for me.
from angular-moment-picker.
Hi @chandanv03, I can't see the example you've posted, can you please share it again? thanks
from angular-moment-picker.
from angular-moment-picker.
Ok, but in that link there's no working example I can run, just pieces of code :)
from angular-moment-picker.
Well, correct me if I'm wrong.
You want to have a field called minDate
that has a restriction on maximum allowable date set to the value of maxDate
property on your scope. You also want to "reset" the maximum date maxDate
to the current date. In the same way minDate
should be a restriction for a minimum allowable value for maxDate
, also resettable to the current date. Isn't it?
from angular-moment-picker.
Could you check this plunker out?
https://plnkr.co/edit/RzIaRJUgMHbPefAdvbIx?p=preview
from angular-moment-picker.
from angular-moment-picker.
I am not sure I've totally understood your problem, but it seems that you don't want a dynamic min/max date, but your restriction will be hardcoded to the current date and time. Right?
Check out this plunker and update it with your change.
from angular-moment-picker.
from angular-moment-picker.
So does that plunker satisfy your needs?
from angular-moment-picker.
from angular-moment-picker.
Happy to hear that! :)
from angular-moment-picker.
Related Issues (20)
- Deactivate two days, and for hours HOT 2
- BUG--> duplicate months when using moment time zone.
- The active year doesn't turn blue (highlight) when I use start-date
- datepicker closes when you click on navigation buttons in ionic v1 and angular 1.4
- Hour view after clicking day HOT 1
- Bootstrap 4 not working HOT 1
- How to show 5 columns in date picker
- 31st Day of Month not selecting properly with Custom Format.
- Is there a way to dynamically enable/disable days or hours
- Pop Up of moment-picker position is not fixed. HOT 1
- I cant update my moment picker from controller side HOT 1
- Duplicate hours when there is DST
- _d and _i are different from each other and are not the date I picked
- Set different start-view based on value
- Force picker to use new time zone
- ng-invalid is not set when the date is manually changed to an invalid value
- Inconsistency in hour and minute selector.
- moment picker calendar display issue in mobile view HOT 1
- Ignoring model changes if model is set to string HOT 1
- Build of master generates many ts errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-moment-picker.