This is a migrated thread and some comments may be shown as answers.
How to make WeekPicker?
3 Answers 27 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kaz
Top achievements
Rank 1
Kaz asked on 12 Sep 2011, 11:51 PM
Hi,

We have a requirement to have a WeekPicker, which selects either Monday or Sunday depending on the configuration. There's an example of WeekPicker using JQuery UI found in here;
http://www.tikalk.com/incubator/week-picker-using-jquery-ui-datepicker

How can we make the same look and feel weekpicker using Telerik DatePicker?

Cheers,
Kaz

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 14 Sep 2011, 02:21 PM
Hi Kaz,

Currently the date picker component does not support such functionality. We are planning to add multiple selection feature, but this will happen in one of the future versions.

Kind regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kaz
Top achievements
Rank 1
answered on 15 Sep 2011, 01:38 AM
Hi Georgi,

Thanks for the quick reply. I have 2 questions regarding this;
 
 1) Is there a way to hi-light a week row on mouse over?
 2) Is there a way to pick a specific day of week upon click event?

Cheers,
Kaz
0
Georgi Tunev
Telerik team
answered on 16 Sep 2011, 02:55 PM
Hi Kaz,

Here is one way to do that (I used the calendar as it is more convenient for picking weeks):
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        .selectedState
        {
            background: red;
        }
    </style>
    <%= Html.Telerik().Calendar()
    .Name("DatePicker1")
    .ClientEvents(e =>
    e.OnChange("onChange"))
 
    %>
    <% Html.Telerik().ScriptRegistrar()
          .OnDocumentReady("setHoverState();");
    %>
    <script type="text/javascript">
 
     
     
 
        function onChange(e) {
            //get the value
 
            var value = e.date;
            alert(value);
        }
 
        function setHoverState() {
            $(".t-content tr").live('mousemove', function () { $(this).find('td a').addClass('t-state-hover'); });
            $(".t-content tr").live('mouseleave', function () { $(this).find('td a').removeClass('t-state-hover'); });
            $(".t-content tr").live('mouseup', function () { $(this).closest("tbody").find('td a').removeClass('selectedState'); $(this).find('td a').addClass('selectedState'); });
             
        }
     
    </script>
</asp:Content>


Kind regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Date/Time Pickers
Asked by
Kaz
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Kaz
Top achievements
Rank 1
Share this question
or