Code Monkey home page Code Monkey logo

Comments (7)

damyanpetev avatar damyanpetev commented on June 6, 2024

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.

damyanpetev avatar damyanpetev commented on June 6, 2024

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.

michaelgroiser avatar michaelgroiser commented on June 6, 2024

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.

damyanpetev avatar damyanpetev commented on June 6, 2024

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.

michaelgroiser avatar michaelgroiser commented on June 6, 2024

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.

damyanpetev avatar damyanpetev commented on June 6, 2024

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.

mpavlinov avatar mpavlinov commented on June 6, 2024

This issue is outdated.

from igniteui-angularjs.

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.