Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
43 views

I have to change the value of a raddateinput server side.

On client side I have an Ajax function than show the age.

What I have to use on server-side and on client-side to fie event?

For example this doesn't works:

server side:

RdMyDateInput.SelectedDate = DateTime.Parse(MyStringDate);

client side:

<telerik:RadDateInput ID="RdNyDateInput" runat="server" ClientEvents-OnValueChanged="AgeCount" Culture="it-IT" MaxDate="2999-12-31" MinDate="1900-01-01" Skin="Silk">
                 <ClientEvents OnValueChanged ="AgeCount"></ClientEvents>
</telerik:RadDateInput>

the event fires only on web page, not by server side.

Thanks

Renati

RRE
Top achievements
Rank 2
Iron
 asked on 17 Mar 2023
1 answer
212 views
Hello,
i have a webform with 4 RadDatePickers. In one control i want to have two different dates.  In the dateInput-control is a date from a database and in the calender-control should be now.
The code look like this:

If IsNothing(Sfo.DatumletztPrüfung) = False AndAlso IsDate(Sfo.DatumletztPrüfung) = True Then
            RadDateLetztePrüfung.DateInput.SelectedDate = Convert.ToDateTime(Sfo.DatumletztPrüfung)
            RadDateLetztePrüfung.Calendar.SelectedDate = Now()
End If

But the controls are empty. Only when is set the date to the RadDatePicker-Control:
 RadDateLetztePrüfung.SelectedDate = Convert.ToDateTime(Sfo.DatumletztPrüfung)
The Date is shown.
What have i made wrong?

Kind regards
Jens

Doncho
Telerik team
 answered on 07 Dec 2021
0 answers
51 views

even in the example it fails on press "Search":

https://demos.telerik.com/aspnet-ajax/datepicker/overview/defaultcs.aspx

Jacqueline
Top achievements
Rank 1
 asked on 10 Nov 2021
1 answer
216 views

I've been trying to resolve an issue with my RadCalendar/Datepicker with Telerik, maybe with bootstrap messing up things.

After upgrading to bootstrap 5 the calendar displays 2 extra caption spaces below the title and below the calendar. How can I remove these caption spaces? I have something simple like this in a row.

<div class='col2' <telerik:raddatepicker id="1234" mindate:"5/5/5555" calendar-showheaders="false" calendar-tltleformat="mmm yyyy" skin="telirek"

</telerick:raddatepicker>

</div>


Attila Antal
Telerik team
 answered on 13 Sep 2021
1 answer
85 views

How Can I Set Date Filter Like this in RAD GRID AJAX ( ASP.NET C#)

Please Ref . Below Image

Regards

Sarthkee

Attila Antal
Telerik team
 answered on 09 Aug 2021
1 answer
191 views

I am having an issue with RadDatePicker when trying to set the input date format to yyyyMMdd.  The desired outcome is allow the user to enter a date in yyyyMMdd format but display the date in the culture specific short date format.  I can achieve the desired functionality like this:


<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Test Page</title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
            <telerik:RadDatePicker runat="server" ID="RadDatePicker1" 
                RenderMode="Lightweight" Culture="English (United States)" 
                DateInput-DisplayDateFormat="d" DateInput-DateFormat="yyyyMMdd" >
            </telerik:RadDatePicker>
        </form>
    </body>
</html>

 

The issue is when using the en-US culture.  I can select a date from the popup and the date is displayed in MM/dd/yyyy format in the textbox.  When I click in the textbox to enter the date, it is automatically changed to yyyyMMdd format and updating it in that format way works correctly.  However, if I enter a date in MM/dd/yyyy format, the date is parsed in the dd/MM/YYYY format so 7/6/2021 becomes 6/7/2021.

When using the fr-FR culture, for example, it correctly parses entered dates entered as either yyyyMMdd or dd/MM/YYYY.

We are using Telerik UI for ASP.NET AJAX 2021.2.616

Any help would be greatly appreciated.

Greg

Attila Antal
Telerik team
 answered on 30 Jul 2021
2 answers
53 views

Hi, I am trying to provide visual indicators within the date input field of the data picker of possible errors with a date selection. I am trying to do this on keyboard input or the date picker date selection.

If the date selected or entered is before a date on the page, I want to show the error field in an error colour as that date could create program with other data being displayed. It is not a fatal error more a visual error. However, I do not see how this can be done because it appears that the date picker control is caching the initial classes and if you mouse over, that initial class over writes what is there and the visual error indication is lost. Alternately, if I try to set the inline styles with JQuery, they do not stick.

Basically, the concept is simple, put in a date before a displayed date, highlight the background of the input field. If the field is highlighted and you change the date to equal or be after the displayed, it goes back to the normal rendered state.

Am I basically SOL here?

Matt Smith
Top achievements
Rank 1
 answered on 25 Mar 2021
0 answers
22 views
So i have dynamically added a RadDateInput to my application. So by default if a user put in a number between 1-31 the dateinput-textbox reacts so it takes the current month and current year and then the number that the user have put in and then builds a date string automatically. if it is below 1 or over 31 the textbox will not accept. But if it is between 1-31 it will as i said take current month and year and then with the day number the user put in, it will automatically give me a date. For example if i put in 11 in the textbox the textbox will automatically giva me 2017/03/11. The problem is that if i put in for example 11 plus any letters it still gives me a date string with current year and current month(example: 11mfweieof would give me today 2017/03/10). But i want it to work if you put in any letters to the textbox i want the textbox to not accept it. Is this possible?
Robel
Top achievements
Rank 1
 asked on 10 Mar 2017
1 answer
42 views

Hello Team,

Telerik Date control display nothing when the date entered as 01/01/1900, Please let me know if we have any workaround for this issue?

Telerik control version : 2012.2.607.40

Thank you.

Viktor Tachev
Telerik team
 answered on 28 Jun 2016
2 answers
84 views

I have a RadDateInput control in a user control for a website:

 <telerik:RadDateInput rendermode="lightweight" id="calOneOff" runat="server" EmptyMessage="Enter valid date" DBSelectedDate='<%# Bind("OneOffDate")%>' SkipMinMaxDateValidationOnServer="true"></telerik:RadDateInput>

 

The original data is from the database, there the OneOffDate field can either have a valid date, or null values.

As I pick this up in visual studio and store the value in a list of objects, the OneOffDate value is held in a property also called OneOffDate, which is a DateTime datatype.  As a result, the stored value for null values is "01/01/0001" (New Zealand culture, so day/month/year).

Unfortunately this causes the RadDateInput to show this value (01/01/0001) on the page, along with a little exclamation mark icon (as its too far back in the past to be a valid date).  Is there a way so that if the date is outside a certain range (e.g. before the year 2000) it will show a blank value on the RadDateInput control when databinding?

Thank you

 

 

Rem
Top achievements
Rank 1
 answered on 01 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?