Telerik Forums
KendoReact Forum
1 answer
39 views

I am trying to fix an issue on an old react application and I am not familiar with the approach used here. We are using the following dependencies(some important ones mentioned). Node version is 14.x


"dependencies": {
"@progress/kendo-ui": "^2021.3.1207",
"@types/node": "^12.20.15",
"@types/react": "^17.0.11",
"moment": "^2.29.4",
"react": "^17.0.2",
.
.
.
}

  "devDependencies": {
    "@types/jquery": "^3.5.5",
.
.
.
  }

Right now we are using the below timepicker and this passes in a datetime value on save, in this format 2024-03-14T09:00:00.000Z. But I want to change this to pass in value as a time in this format HH:mm:ss .

      <input
        id={this.id}
        name={this.props.validationName}
        data-role="timepicker"
        data-bind={`value: ${ValueCodes.Start}`}
        data-format="h:mm tt"
        required={true}
        disabled={true}
      />
I understand that the ValueCodes.Start mentioned above is linked with the type of the input filed. I did find the following set of codes that determine the type of that field in the corresponding datasource builder file.
export class ValueCodes {
  public static readonly Start = 'sTRT_TIME';
.
.
.
}

protected getDataSourceOptions() {
    const fields: { [key: string]: { type: string } } = {};
    switch (this.categoryCode) {
      case 'INIT':
        fields[ValueCodes.Start] = { type: 'date' };
.
.
.
        break;
.
.
.
      default:
        break;
    }
    return {
      fields: fields,
      transportOptions: { baseUrl: `${X.getApiUrl()}value/${this.categoryCode}` }
    };
  }
}


On changing the 'type' from 'date' to 'time' here, fields[ValueCodes.Start] = { type: 'date' }; I encountered some errors. I was only able to save the value in my desired format, if I disable validation. Aprart from that the timepicker now will not load the datetime or time value fetched from the backend because of the 'type' change from 'date' to 'time'.

Is there a specific way in kendo that I can try to overcome this?

Konstantin Dikov
Telerik team
 answered on 14 Mar 2024
1 answer
31 views

 

Hi Support,

I just wondering on how to change the date format on Scheduler components (look picture below, those start and end section). At the moment my date format is coming up as month/day/year, but what i want is day/month/year.

 

This is the KendoUI React Scheduler i am using on my code. 

 

I tried to look at  your api online but still couldn't get the solutions. Please give me advice.

 

Thanks

 

John

 

 

 

Konstantin Dikov
Telerik team
 answered on 12 Feb 2024
0 answers
20 views

Hi , Here is the code we are using for datetimepicker , kindly have a check , 

 <IntlProvider locale={this.currentLocale}>
                                {isDateTimePicker ?
                                    <DateTimePicker
                                        value={this.state.fieldValue}
                                        onChange={this.changeDate}
                                        width={width}
                                        format={getLocaleDateString(window.navigator.language, isDateTimePicker)}
                                    /> :
                                    <DatePicker
                                        value={this.state.fieldValue}
                                        onChange={this.changeDate}
                                        width={width}
                                        format={getLocaleDateString(window.navigator.language)}                                        
                                    />
                                }
                            </IntlProvider>
Mounikareddy
Top achievements
Rank 1
 asked on 22 Jan 2024
1 answer
53 views

Hello,

I'm currently not using the KendoReact - DateTimePicker because I miss the ability to apply a selected Date/Time without

having to press "set". Maybe with an onChange event or similar.

Does anyone have a best practice or workaround to solve this issue?

 

Thanks in advance and Kind regards ~

Wissam
Telerik team
 answered on 18 Oct 2023
1 answer
183 views

Hi,

Please see this example https://codesandbox.io/s/thirsty-bohr-2s8dmm?file=/app/main.jsx. There is a very simple DatePicker and a very simple Grid in the page. The Grid has 1000 rows. When clicking the DatePicker button, it take 1 - 2 seconds to show the calendar dropdown, which  significantly slower then normal.

 

Thanks,

Jie

Filip
Telerik team
 answered on 10 Jul 2023
2 answers
138 views

Hi ,

Today is 3/08/2023. I tried to create 2  DateTimePicker  controls  as code below 

const effDate2 = new Date( "2023-03-03");
   

consttoday = newDate();

 <div className="mb-3">
                  <Label> Effective Date </Label>
                  <DatePicker name = 'effectiveDate' value ={effDate2} onChange={handleDatePickerChange} />
                 
                </div>
                <div className="mb-3">
                  <Label> Today  </Label>
                  <DatePicker name = 'today' value ={today} onChange={handleDatePickerChange} />
                 
                </div>

 

The Effective Date control show :   while the Today Date show  

 

Can you pls advise me why the value of Effective Date changed ? 


Thanks,
Thao Phan

 


Vessy
Telerik team
 answered on 26 May 2023
1 answer
55 views

So it seems no matter what I do, I can't have a DateTimePicker default to show={true} in a Dialog. I keep getting a Maximum Update error in the popup. All I'm trying to render is this;

return (
     <Dialog
      title="Select Time Range"
      onClose={props.toggleDialog}
      width={900}
      height={700}
    >
      <DateTimePicker
        show={true}
      ></DateTimePicker>    
    </Dialog>
  );

Wissam
Telerik team
 answered on 24 Apr 2023
0 answers
81 views

Hi. I'm trying to changing milliseconds part.

But, it's perfect only to display milliseconds part.

In other words, milliseconds part cannot be changed using mouse wheel or keyboard.

In addtion. cannot make milliseconds part be focused.

(date,hour,minute and second are working)

 

the format props of DateTimepicker is "yyyy-MM-dd HH:mm:ss .SSS"

the defaultValue and value props also is correct. Because displaying milliseconds is perfect.

 

 

@progress/kend-react-dateinputs: ^5.7.0

 

Pease. let me resolve this problem.

 

thanks.

 

 

 

n/a
Top achievements
Rank 1
 updated question on 17 Oct 2022
1 answer
62 views

Just so you know I'm currently using version 3 of kendo react

I'm having an issue where I have a form, showing in a dialog box. When the screen size is smaller, and i click the date time picker on my form, the date time picker crops out of the page, so I can't see the bottom of the date time picker. I was thinking to use a class to reposition the datetime picker, but I'm unable to connect my KendoDateTimePicker popupcClass with the CSS class that I added. When i check the popup's class my css class isn't there. What's a good way to make it that my datetimepicker doesn't crop out of my page?

 

Filip
Telerik team
 answered on 23 May 2022
2 answers
521 views

Hello, I have a problem when using DatePicker in the dialog. In the small height screen devices, the DatePicker does not show fully. Please help me if you know how to fix it, thanks!

Khan
Top achievements
Rank 1
Iron
 updated answer on 16 Feb 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?