Comments (7)
Hello,
We keep a combined documentation that explains how options are handled, because it'd be quite redundant to go and write up for each control's options, considering they are handled the same way. The basic rules you can find on the readme:
https://github.com/IgniteUI/igniteui-angular#configuring-control-options
And there's a bit more detailed topics at:
http://www.igniteui.com/help/angularjs-directives
Since the datePickerOptions
are a nested object, you can provide a nested tag for the date picker (same dash naming applies) and assign attributes you want set. For example setting numberOfMonths
looks like this:
<ig-date-picker id="datePicker1" ng-model="editors.date">
<datepicker-options number-of-months="2"></datepicker-options>
</ig-date-picker>
As for the events (see Readme and topic), you can handle with scope functions by using event- prefixed attribute:
<ig-date-picker class="form-control" id="datePicker1" ng-model="editors.date"
event-drop-down-list-opened="calendarEvent"
event-drop-down-list-closed="calendarEvent"
event-blur="calendarEvent">
</ig-date-picker>
Sample: http://jsfiddle.net/damyanpetev/nwxc6a9g/
from igniteui-angularjs.
P.S. For completeness I should mention functions in nested options. Since it's not possible to pass reference with tag attributes, those can also be prefixed with event-
where it makes sense or place those in curly braces to get them evaluated in the scope:
$scope.onChangeMonthYear = function (){}
...
<datepicker-options
event-on-change-month-year="onChangeMonthYear"
OR
on-change-month-year="{{onChangeMonthYear}}"></datepicker-options>
Note: You can create options in the controller instead of declarative options.
from igniteui-angularjs.
thanks. i was able to add datepickerOptions and add ChangeYear and ChangeMonth. But trying to select Year/Month doesn't open the Select List. when i use IE it works. Doesn't work with Chrome
from igniteui-angularjs.
Thank you for reporting this. I believe you might have stumbled upon a known issue with the widget itself, that we already have resolved internally. There should be a scheduled bi-weekly build next week, but in case this is something urgent preventing your work from moving forward I can think of a quick workaround:
http://jsfiddle.net/damyanpetev/nwxc6a9g/5/
The handling on this event is not intended to do anything at the moment, but I'd still suggest deleting the rendered event after an update is available.
from igniteui-angularjs.
thanks. but now when i try to open the year chooser, it opens for a moment and immediately the datepicker is closed (calendar as well)
from igniteui-angularjs.
Any chance you can provide a small sample (feel free to modify the fiddle from above) that I can take a look at?
from igniteui-angularjs.
This issue is outdated.
from igniteui-angularjs.
Related Issues (20)
- igTree performance HOT 1
- exitEditMode after rebinding causes igGrid data to revert to old data HOT 4
- Angular JS Data Chart
- Error when setting datasource of combo editor provider of igGrid HOT 5
- Samples are broken
- igLayoutManager sample is not propertly working
- Error: cannot call methods on igGrid prior to initialization; attempted to call method 'destroy' HOT 1
- igTileManager sample is not loading correctly HOT 1
- Create igniteui-angularJS quickstart application HOT 1
- Help please HOT 2
- igCombo: setter method for the "mode" option HOT 1
- Update the npm package to match the updated repository name
- Can't type spaces (with space bar) in iggrid filter HOT 5
- Combo appends text after Shift-tabbed action
- Samples are broken on github.io HOT 1
- The igCombo directive misses a model.$isEmpty implementation
- Project build is failing
- Migrate protractor test to karma or enable them in github actions
- igCheckboxEditor does not update its model when ngModel is specified
- [igMap] Github pages sample is not shown HOT 1
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 igniteui-angularjs.