Comments (6)
I have tracked it down to the following code
if (controller) {
controller.$render();
// Update the model with the value from the datepicker after parsed
setVal(true); // *** this causes control to become dirty ***
}
from ui-date.
Thanks for tracking that down, I will not have much time to update this so PRs are welcome.
from ui-date.
@alexanderchan I understand and will see if I can get to it next week
from ui-date.
+1
If I add controller.$setPristine();
after setVal(true);
it seems to work.
Too simple?
`
from ui-date.
can you guys fix it ?
from ui-date.
You can just add after lines:
if (controller) {
controller.$render();
// Update the model with the value from the datepicker after parsed
setVal(true);
controller.$setPristine();
additional code to set form $dirty field to false
if (controller.$$parentForm) {
var anyOther = false;
for (var key in controller.$$parentForm) {
if (key.indexOf('$') != 0) {
var siblingController = controller.$$parentForm[key];
if (siblingController.$dirty) {
anyOther = true;
break;
}
}
}
if (!anyOther) {
controller.$$parentForm.$setPristine()
}
}
from ui-date.
Related Issues (20)
- model value not bind with datepicker HOT 9
- Cannot set property 'uiDateValidator' of undefined HOT 2
- Empty value is invalid even though it is not required HOT 1
- ng-required="false" triggers uiDateValidator error HOT 1
- Using with MongoDB HOT 3
- How to set Minimum Date and Maximum Date in this ui-date Datepicker HOT 1
- Version 1.0.0 does not have updated dist HOT 3
- npm says there is a 1.0.1 version, but there is not 1.0.1 tag in github. HOT 1
- why nexxa in changelog.md?
- Need a Angular- UI Date picker where we can select Month and Year in the dropdown. HOT 2
- ignoreReadonly() HOT 1
- Can't resovle module ''jquery-ui/datepicker" HOT 5
- Hitting enter on bad string doesn't update it to a real date
- Changelog indicates a 1.1.1 version but there is not 1.1.1 tag in github.
- Date Format without Time
- ui-date datepicker does not scroll with modal when kept inside it HOT 1
- can not working with ngdialog
- Latest version 1.1.1 changes not "released" for bower
- refresh datepicker
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 ui-date.