diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 624e126..c4abc74 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -161,8 +161,10 @@ my $QueryString =
 
 $QueryString ||= 'NewQuery=1';
 
-# Default Query and Format
+# Default Query, Format and Order
 my $TempFormat = "__Starts__ __Due__";
+my $TempOrderBy = 'id';
+my $TempOrder = 'ASC';
 my $TempQuery = "( Status = 'new' OR Status = 'open' OR Status = 'stalled')
  AND ( Owner = '" . $session{CurrentUser}->Id ."' OR Owner = 'Nobody'  )
  AND ( Type = 'reminder' OR 'Type' = 'ticket' )";
@@ -175,6 +177,8 @@ if ( my $Search = RTx::Calendar::SearchDefaultCalendar($session{CurrentUser}) )
 # we overide them if needed
 $TempQuery  = $Query  if $Query;
 $TempFormat = $Format if $Format;
+$TempOrderBy = $OrderBy if $OrderBy;
+$TempOrder = $Order if $Order;
 
 # we search all date types in Format string
 my @Dates = grep { $TempFormat =~ m/__${_}(Relative)?__/ } @DateTypes;
@@ -189,6 +193,6 @@ $TempQuery .= RTx::Calendar::DatesClauses(\@Dates, $date->strftime("%F"), $end->
 
 # print STDERR ("-" x 30), "\n", $TempQuery, "\n";
 
-my %Tickets = RTx::Calendar::FindTickets($session{'CurrentUser'}, $TempQuery, \@Dates, $date->strftime("%F"), $end->strftime("%F"));
+my %Tickets = RTx::Calendar::FindTickets($session{'CurrentUser'}, $TempQuery, \@Dates, $TempOrderBy, $TempOrder, $date->strftime("%F"), $end->strftime("%F"));
 
 </%INIT>
diff --git a/lib/RTx/Calendar.pm b/lib/RTx/Calendar.pm
index c78849c..adb1892 100644
--- a/lib/RTx/Calendar.pm
+++ b/lib/RTx/Calendar.pm
@@ -57,7 +57,7 @@ sub DatesClauses {
 }
 
 sub FindTickets {
-    my ($CurrentUser, $Query, $Dates, $begin, $end) = @_;
+    my ($CurrentUser, $Query, $Dates, $OrderBy, $Order, $begin, $end) = @_;
 
     $Query .= DatesClauses($Dates, $begin, $end)
 	if $begin and $end;
@@ -65,6 +65,19 @@ sub FindTickets {
     my $Tickets = RT::Tickets->new($CurrentUser);
     $Tickets->FromSQL($Query);
 
+    if ( $OrderBy =~ /\|/ ) {
+	# Multiple Sorts
+	my @OrderBy = split /\|/, $OrderBy;
+	my @Order   = split /\|/, $Order;
+	$Tickets->OrderByCols(
+	    map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } }
+	    ( 0 .. $#OrderBy )
+	);
+    }
+    else {
+	$Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order );
+    }
+
     my %Tickets;
     my %AlreadySeen;
 