Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
15 views
I have RadDatePicker in detail window for grid. I need to modify background color dynamically so I added new script to Calender like this:
datePicker.Calendar.ClientEvents.OnLoad = initMethodName;
Now I noticed that calendar is never destroyed from page. If I close detail window and open it again then initialization method is called twice.
It looks that table element with id "<ctrl_name>_calendar" is always there and never unloaded.

Can you help me how to dispose this object or remove event from it?

Thank you.
Petr
Top achievements
Rank 1
Iron
 asked on 16 Feb 2024
9 answers
162 views
Hello,

Putting a calendar control in a center pane with vertical & horizontal splitters:

I would like to understand if the calendar control can be forced to expand horzontally (taking up 100% of width at all times) as the vertical splitter bar expands. It appears the calendar does grow vertically as the horizontal splitter bar expands.

Thanks!
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 09 Jan 2024
1 answer
27 views

Hi Team ,

1. The below style i have to trigger during checkbox check status change

<style type="text/css">
    table.RadCalendar_Default .rcRow .rcSelected
    {
        background: red;
    }
</style>

Need to give this style inside javascrit

 

2. I need to change the same radcalendar hover colour change when the checkbox status change

checkbox1 ✅️

radcalendar control

I have to change the radcalendar date hovering to red if i check the checkbox and normal colour if unchecked

Vasko
Telerik team
 answered on 19 Oct 2023
2 answers
39 views

how to add styles for radcalendar asp.net in the javascript

<style type="text/css">
 .RadCalendar .rcTitlebar .rcTitle
    {
      color:#1F3E74 !important;
    }

</style>

 

This same style i have to give inside javascript during checkbox click..dont know how to continue below

<script type="text/javascript">
        function validate() {
            if (document.getElementById('cricket').checked) {
                alert("checked")
                var calendar = document.getElementById("Calendarmain").className

                document.getElementById("Calendarmain").style  (..dont know how to give the same style above here ?????)

                           }

        }

    </script>

<input id="test" title="test" name="test" type="checkbox" onclick="validate()" />

         
Vasko
Telerik team
 answered on 17 Oct 2023
5 answers
510 views
Hi,

I have 2 RadDatePickers.

and 1 button.



I want to know how to get number of day between selected date 1 and selected date 2 when I click the button.
jack
Top achievements
Rank 1
Iron
 updated answer on 16 Feb 2023
2 answers
75 views

I have a RadGrid with a GridDateTimeColumn.

This GridDateTimeColumn has EnableRangeFiltering="true" to display the filter :

<telerik:GridDateTimeColumn DataField="xxx" HeaderText="xxx" AutoPostBackOnFilter="true" 
                    SortExpression="xxx" UniqueName="xxx" PickerType="DatePicker"
                    DataFormatString="{0:D}" EnableRangeFiltering="true" ShowFilterIcon="false">
                </telerik:GridDateTimeColumn>

I have changed the currentCulture of the thread to display calendar in French.

But, if I click on the selected month, I have another popup to choose month and years :

I would like to change the label of the three button "Today", "Ok" and "Cancel".


I have access to the RadDatePicker with the RadGrid OnItemDataBound function, but the following code doesn't work :

protected void RadGrid_OnItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
               ...
            } else if (e.Item is GridFilteringItem)
            {
                GridFilteringItem filterItem = e.Item as GridFilteringItem;
                var columns = filterItem.OwnerTableView.RenderColumns
                    .OfType<GridDateTimeColumn>()
                    .Where(x => x.AllowFiltering && x.EnableRangeFiltering);

                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");

                foreach (GridColumn col in columns)
                {
                    ...
                    RadDatePicker picker = filterItem[col.UniqueName].Controls[1] as RadDatePicker;
                    picker.Calendar.FastNavigationSettings.CancelButtonCaption = "Annuler";
                    ...
                }
            }
        }

Someone knows how I can access on this three button in my c# code to change this property ?

 

Thanks

Ludovic
Top achievements
Rank 1
Iron
 answered on 10 Feb 2023
1 answer
532 views

We have a very old ASP.NET web forms website and it was using a 6+ year old version of the Telerik Web UI controls.

In aid of resolving one of our issues where the calendar control "jumps" randomly when creating a new entry, we were advised to upgrade to a newer version of the control (2022.1.302.45).

 

I installed the Telerik tools and then removed the old references of the control and added the NEW references.

Immediately it breaks the page.

I get the following JS errors when I try to click on the calendar view/grid:


       
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
widget_embed_libraries_191.js:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
Calendar_XLogs.aspx:1558 
        
       Uncaught SyntaxError: Unexpected token ';'
rsSprites.png:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
widget_embed_191.css:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
widget_embed_libraries_191.js:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED

  

 

 

 

Uncaught TypeError: Cannot read properties of undefined (reading 'open') at window.radopen (ScriptResource.axd?d=yK6qhJVfE0myfV1ijwDRg-fVrTRo-HZ-D2o9yhz8hJaIb7KWAwHYA1TrIDU15KJWCq4MuKg8c6a88RTJAnELh5IUQUlgOGiGuL0CJP9mBCdrzbiyNqx_HxsYXXauKkamF_aF6PVXTYvgWhjtoGGkxRlhuV01&t=37e10300:17:10) at <anonymous>:1:12 at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:346:38) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_nextSession [as _nextSession] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:373:14) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:360:18) at Sys$_ScriptLoader$_nextSession [as _nextSession] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:373:14) at Sys$_ScriptLoader$loadScripts [as loadScripts] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:262:18)

 

Any ideas where to go from here?

Rumen
Telerik team
 answered on 17 May 2022
2 answers
288 views
Hi, i'm having troubles using RadDatePicker; i tried to build a layout like bootstrap without success.

I would transform RDP like

<div class="input-group date">
  <input type="text" class="form-control"><span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
</div>

so how can i do it?
I obtained only a little success setting

CssClass="form-control" for DateInput part.

Thank you.
Attila Antal
Telerik team
 answered on 25 Feb 2022
1 answer
198 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
44 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?