How to add a extra date to a object

2 posts, 0 answers
  1. MadhuSudhan
    MadhuSudhan avatar
    12 posts
    Member since:
    Apr 2011

    Posted 10 Jun 2011 Link to this post

    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');
                                                    }}
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 16 Jun 2011 Link to this post

    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.

Back to Top