This is a migrated thread and some comments may be shown as answers.

Calendar begin and end dates

3 Answers 152 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
cracka!
Top achievements
Rank 1
cracka! asked on 28 Nov 2012, 07:32 PM
I'm trying to retrieve the begin and end dates of the current calendar, but I can't determine the property or method.  I'm using JQuery and am able to retrieve the current month using

$(

 

"#myCalendar").kendoCalendar().data("kendoCalendar")._current.getMonth()

 

Any help would be greatly appreciated!

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 29 Nov 2012, 10:13 AM
Hello Edward,

Could you please elaborate more on this "retrieve the begin and end dates of the current calendar"? Do you need to know the first and last day of the current shown month? If this is the case, then you can use the first/last method of the current view. Currently you can get the view through the internal _view property. Please note that we do not suggest using of the internal properties, because they can be changed at any time and are not intended for public usage.

As a side note, we are considering to expose the current focused date and current view through methods in the next service pack of Kendo UI.


 
Greetings,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
cracka!
Top achievements
Rank 1
answered on 29 Nov 2012, 01:13 PM
Sure, I can elaborate.  The simple fact is, in order to use the calendar (to populate or get data from), it is useful to know the begin and end date (month/day/year) without having to recombine the individual components.  I'm using the current month begin and end dates to retrieve data for populating the days with events.  I'm looking for ease of coding here.  The fact that you don't expose a short date for even the selected day seems a little short sighted.

Also, our group here has had mixed feeling about Kendo.  Our biggest complaint is the lack of useful documentation.  All examples show only the basics, and rarely dive into more of an out of the box approach, which is almost always the real world.  The calendar control is one of them.  The problem I'm trying to solve at this point is how to display only 2 or 3 items in a day, and to provide an expand approach when more than 3 are available.  Otherwise, the week row just grows taller.  This is not typically what is seen in popular calendars such as Outlook.  I'm just trying to provide constructive feedback.

Thank you for your time, and your feedback
0
Georgi Krustev
Telerik team
answered on 03 Dec 2012, 09:24 AM
Hello again Edward,

 
Thank you for your feedback. The Calendar widget is designed to be more flexible  and that is why its value is a Date object. Thus you can format it in any format depending on your needs. If you need a method, which returns formatted value, I will suggest you open a uservoice item for this functionality. Currently, you are the first one, who actually needs such functionality - short date, current view and current focused date. As I pointed in my previos reply, we think that it will be helpful to expose these properties. Once we make them public, we will document them.

As for the documenation we are improving it with every new update - the product is under heavy development and we document every new feature as soon as it is released. Note however, that the documentation covers only the built-in functionality, while in your case we are talking for custom implementation.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Calendar
Asked by
cracka!
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
cracka!
Top achievements
Rank 1
Share this question
or