     @IBAction func onDoneDatePopup(sender: UIButton) {
         
         let formatter1 = DateFormatter.MM_dd_yyyy
-        let fromDate = formatter1.dateFromString((fromButton.titleLabel!.text)!)
-        let toDate = formatter1.dateFromString((toButton.titleLabel!.text)!)
+        fromDate = formatter1.dateFromString((fromButton.titleLabel!.text)!)
+        toDate = formatter1.dateFromString((toButton.titleLabel!.text)!)
+        
+        print("from: \(DateFormatter.E_MMM_dd_yyyy.stringFromDate(fromDate!))")
+        print("to: \(DateFormatter.E_MMM_dd_yyyy.stringFromDate(toDate!))")
+        
+        reloadDateRange()
+        tableView.reloadSections(NSIndexSet(indexesInRange: NSMakeRange(0, 3)), withRowAnimation: UITableViewRowAnimation.Automatic)
         
         let formater2 = DateFormatter.MMM_dd_yyyy
         navigationItem.title = formater2.stringFromDate(fromDate!) + " - " + formater2.stringFromDate(toDate!)

                break
            case 1:
                viewMode = ViewMode.Monthly
                navigationItem.title = DateFormatter.MMMM.stringFromDate(NSDate())
                
                let (beginMonth, endMonth) = getMonth(monthIndex)
                fromDate = beginMonth
                toDate = endMonth.dateByAddingTimeInterval(oneDay)
                
                break
            case 2:
                viewMode = ViewMode.Yearly
                navigationItem.title = DateFormatter.yyyy.stringFromDate(NSDate())
                
                let (beginYear, endYear) = getYear(yearIndex)
                fromDate = beginYear
                toDate = endYear.dateByAddingTimeInterval(oneDay)
                
                break
            case 3:
                viewMode = ViewMode.Custom
                showPopup(datePopup)
                return
            default:

            break
            
        case UISwipeGestureRecognizerDirection.Down:
            performSegueWithIdentifier("QuickMode", sender: self)
            
        default:
