Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Open telerik datetime picker programmatically

Hello,
How to Open telerik datetime picker programmatically

Cheers
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Eric ,
I need to click on a textbox and it should trigger drop down of the datetimecontrol

Cheers
You would need to give the focus to the datepicker, send the F4 key and give back to the textbox. This is not an ideal solution. Are you sure your scenario is optimal or wouldn't it be better to show a Month calendar instead?
here:

var timePicker = null;
this.initialize = function(picker)
{
  timePicker = picker;
}

timePicker.showTimePopup();

Open in new window


https://demos.telerik.com/aspnet-ajax/datetimepicker/client-side-programming/client-side-api/defaultvb.aspx?show-source=true
Avatar of RIAS

ASKER

Thanks Huseyin KAHRAMAN,
Thanks, can you please provide me with vb.net code.
It really don't think that this sample will work. It is for ASP.Net.
why do you need to open it on server side?

these are tiny popups when user clicks some date fields on client side...

check this demo

http://demos.telerik.com/aspnet-ajax/datepicker/overview/defaultvb.aspx?show-source=true

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
Date From : <telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker1" Width="50%" ClientEvents-OnDateSelected="OnDateSelected" runat="server" DateInput-Label="From Date">
Date To : <telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker2" CssClass="toDate" Width="50%" runat="server" DateInput-Label="To Date">

Open in new window


you dont need to write any code for this...
I am pretty sure that the application of RIAS is a Windows Forms app (and not a web app)
Avatar of RIAS

ASKER

Yes, It is desktop . Thanks
Avatar of RIAS

ASKER

Eric,
Thanks.It works fine but flickers when mouse clicks.

Cheers
You are working a bit against the original way the control was built. Maybe ask your question would be better directly on Telerik's support page.
Avatar of RIAS

ASKER

Thanks