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

How to add a extra date to a object

1 Answer 35 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
MadhuSudhan
Top achievements
Rank 1
MadhuSudhan asked on 10 Jun 2011, 11:20 AM
function FormatSelectedDate(picker)
{
  var date = picker.get_selectedDate();
  var dateInput = picker.get_dateInput();
  var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
   return formattedDate;
}

from my side i can not see the out put of above function. So please let me know what kind of formatted date above function will return. Also please let me know how to add a extra date to the above returned date.

I am using the above function to get the formatted date in below functionality.
here i need to Add a extra date to toDate variable so that i can filter to get the selected date data also by using " tableView.filter('" + this.UniqueName + @"', fromDate + ' ' + toDate + 1 , 'Between');"
function " + this.UniqueName + @"ToDateSelected(sender,args) {
                                                var tableView = $find('" + this.Owner.OwnerGrid.MasterTableView.ClientID + @"');
                                                var fromPicker = $find('" + parentClientID.Substring( 0, parentClientID.LastIndexOf( "_" ) + 1 ) + this.UniqueName + @"FromPicker');
                                                var fromDate = FormatSelectedDate(fromPicker);
                                                var toDate = FormatSelectedDate(sender);
                                                if ( fromDate == '')
                                                {
                                                    tableView.filter('" + this.UniqueName + @"', toDate , 'LessThanOrEqualTo');
                                                }
                                                else
                                                {
                                                    
                                                    tableView.filter('" + this.UniqueName + @"', fromDate + ' ' + toDate + 1 , 'Between');
                                                }}

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 16 Jun 2011, 08:52 AM
Hello MadhuSudhan,

I attached a runnable demo that is based on your code.

I hope this helps.

Regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Calendar
Asked by
MadhuSudhan
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or