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

Calendar picker with ComboBox

5 Answers 73 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ron Boehm
Top achievements
Rank 1
Ron Boehm asked on 15 Jul 2010, 10:06 PM
I want have a combobox that allows free text and a date picker icon only (no extra text box)

I can populate the combobox myself if I get a postback with the date selection.
Can I make the text box in a datepipcker hidden?

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Jul 2010, 07:38 AM
Hello Ron,


Have you tried RadCalendar with separate image for pop-up, instead of RadDatePicker?

You can find some similar approach described here.

-Shinu.
0
Ron Boehm
Top achievements
Rank 1
answered on 16 Jul 2010, 05:54 PM
Sorry, I accidentily replied to the old thread

I am able to remove the textbox and connect the calendar to the combobox.

The problems are:
    The calendar icon is in a dev and puts extra space around it in the GUI.
    On startup, the calendar flashes on and then off and the space it took up is not removed,
        so there is a big whole in my GUI.

0
Ron Boehm
Top achievements
Rank 1
answered on 19 Jul 2010, 07:11 PM
Any ETA on this?  I need a solution today...

Any help will be appreciated...
0
Nikolay Rusev
Telerik team
answered on 22 Jul 2010, 08:19 AM
Hello Ron,

You can toggle display property instead of setting control invisible initially:

<table>
        <tr>
            <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>       
            </td>
            <td>
                <img src="Calendar.png" alt="Alternate Text" onclick="openPopup();"/>
            </td>
        </tr>
    </table>
    <telerik:RadCalendar ID="RadCalendar1" runat="server" style="display:none">
        <ClientEvents OnDateSelected="OnDateSelected" />
    </telerik:RadCalendar>

<script type="text/javascript">            
            function OnDateSelected(sender, args)
            {
                var dt = new Date();
                //args.get_renderDay().get_date()
            }
            function openPopup()
            {
                var calendar = $find('<%= RadCalendar1.ClientID %>');
                calendar.get_element().style.display = "";
                // Read the textbox value and set the Date of Calendar               
            }
</script>


Greetings,
Nikolay
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
Ron Boehm
Top achievements
Rank 1
answered on 22 Jul 2010, 12:14 PM
Thanks, this seems to work.

Unfortunately, in the week it took to answer this question, I have already implimented a competitors control that provided a PopupCalendar out of the box.  In a fast paced world, a week is a long time...
Tags
Calendar
Asked by
Ron Boehm
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ron Boehm
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or