Telerik Forums
KendoReact Forum
1 answer
29 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
1 answer
78 views

The error displayed is

ERROR in ./node_modules/@progress/kendo-react-popup/index.mjs

I followed these instructions from https://www.telerik.com/kendo-react-ui/components/getting-started/

npx create-kendoreact-app

Below is my configuration

? What is the name of your project? demoapp

? Do you want to use TypeScript? No

? Do you want to use SASS? Yes

? Which Kendo UI Theme do you want to use?

❯ default

bootstrap

material

after this i entered the directory and performed

npm i npm run start

 

I get errors like

 

ERROR in './node_modules/@progress/kendo-react-layout/...'

 

This is a NEW Project with React 18 and Node 18.15

Vessy
Telerik team
 answered on 18 Dec 2023
1 answer
70 views
Hi!

By default  in the Calendar component, the weekends are set for Saturday and Sunday. The "isWeekend" property is read-only.

How can I set weekends to other days?
And how can I assign additional days, for example holidays, business trips, vacations, sick leave?
And highlight such days on the calendar in different ways.

How can I set the first day of the week, for example, Wednesday?

Best regards

Vessy
Telerik team
 answered on 11 Sep 2023
2 answers
40 views

Hi.

In your documentation example of the MultiViewCalendar on this page you write "For the custom cell to allow date selection, manually pass or handle the onClick event".

In the code of the example the onClick event is handled in the CustomCell component but still nothing happens if I click on a date that should be a valid selection. I tried it out myself in my code and it doesn't work. Isn't the "handleClick" method in the CustomCell component enough to handle the onClick event?

And another question: Is it also possible to allow to select more than one day in the Calendar component?

Thanks,

Greetings,

Bernd

Bernd
Top achievements
Rank 5
Bronze
Bronze
Iron
 answered on 03 Aug 2023
1 answer
151 views

Hi,

The Calendar Fast Navigation Bar is currently broken in all versions of KendoReact that support React 18 as per https://github.com/telerik/kendo-react/issues/1566. We are working around the issue by disabling the Calendar Fast Navigation Bar as described here https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar/sidebar/.

Unfortunately this does nothing to address the issue in KendoReact Grid filter menus - see this StackBlitz for an example: https://stackblitz.com/edit/react-va2kr1?file=app%2Fmain.tsx.

Is there a way to globally disable the Calendar Fast Navigation Bar so we don't have to do this everywhere and create a custom Grid filter?

 

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 15 May 2023
1 answer
1.0K+ views

Hi, Subject says it all.

 

Why not support this functionality?

 

I want to use server date when [TODAY] button is clicked,

 

 

 

 

Konstantin Dikov
Telerik team
 answered on 06 Oct 2022
1 answer
895 views
Hello,

I have a scenario when I want to disable special weekdays from  Datepicker so the user can't choose those days.
Currently, the app is using react so is there a way to disable dates for kendo UI Datepicker
Kiril
Telerik team
 answered on 20 Dec 2021
1 answer
1.7K+ views

Hi forums,

I wonder is there any way for me to have a year-only datepicker. Without month or date. How can I customize the component to suit my need?

 

Thanks!

Konstantin Dikov
Telerik team
 answered on 18 Nov 2021
1 answer
131 views

Hi,

Whenever Calendar value is set after an api call, Calendar plugin will randomly stop working. The value will be set correctly but it wont focus or scroll to the value. it will display some random month.

eg: if the calendar value is set to 09-27-2021 and the calendar plugin displays the UI correctly. soon after if value is changed with new date after an api call the calendar UI will randomly display some other month. 

Do you guys have a fix for it or is it a bug. Please let me know asap.

her is a sample code :  click the change button twice to see the issue. i had used set timeout to replicate an API call.

https://stackblitz.com/edit/react-owrx8z?file=app/main.jsx

 

Thanks

 

Stefan
Telerik team
 answered on 28 Sep 2021
1 answer
925 views

Hello, 

I've an issue with DatePicker Component. I created a custom component based on DatePicker.

It's just a component with a fixed label (top, left, right or bottom) with sizing to create form more quickly

After lot of hours of search, no success, I'm forced to post a message on forum to resolve this issue. It's very strangely for me nay impossible without a fix. It's my opinion. 

See below or file in attachment for test and fixing of this issue

Thank you

Cyril REILER

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { withTranslation } from 'react-i18next';
import Proptypes from 'prop-types';
import { DatePicker } from "@progress/kendo-react-dateinputs";
//import { CustomWeekCell } from '../ExtendedClasses';
import moment from 'moment-timezone';

class MyDatePicker extends Component {
    static propTypes = {
        //required
        t: Proptypes.func.isRequired,
        name: Proptypes.string.isRequired,
        callback: Proptypes.func.isRequired,
        style: Proptypes.objectOf(Proptypes.string),
        //optional
        defaultValue: Proptypes.oneOfType([Proptypes.string, Proptypes.number]),
        disabled: Proptypes.bool,
        readOnly: Proptypes.bool,
        required: Proptypes.bool,
        width: Proptypes.number,
        tabIndex: Proptypes.number,
        //Extended by Telerik Component
        labelWidth: Proptypes.oneOfType([Proptypes.string, Proptypes.number]),
        labelHeight: Proptypes.oneOfType([Proptypes.string, Proptypes.number]),
        floatingLabel: Proptypes.string,
        fixedLabel: Proptypes.string,
        labelPosition: Proptypes.string,
        formatPlaceholder: Proptypes.objectOf(Proptypes.string),
        weekNumber: Proptypes.bool,
        format: Proptypes.string,
        value: Proptypes.string,
    }

    static defaultProps = {
        _datepicker: null,
        style: {},
        defaultValue: '',
        disabled: false,
        readOnly: false,
        required: false,
        width: 100,
        tabIndex: -1,
        //Extended by Telerik Component
        labelWidth: "auto",
        labelHeight: "auto",
        floatingLabel: '',
        fixedLabel: '',
        labelPosition: 'left',
        formatPlaceholder: { year: "    ", month: "  ", day: "  " },
        weekNumber: false,
        format: "dd/MM/yyyy",
        value: "",
    }

    /**
     * @constructor
     * @param {Object} props - props of the component
     * @description instantiate component and his state
     */
    constructor(props) {
        super(props);
        this.state = {
            value: props.defaultValue,
        };
    }

    /**
     * 
     */
    componentDidMount() {
        console.log("componentDidMount")
        const {
            value,
            defaultValue,
            format,
        } = this.props;

        console.log(this.props)
        this.setState({
            defaultValue: null,
        });
        this.setState({
            defaultValue: defaultValue,//no effect !!!
            value: value,//no effect !!!
        });
        console.log("value from props");
        console.log(value);

        console.log("value from state");
        console.log(this.state.value);

        console.log("defaultValue from props");
        console.log(defaultValue);

        console.log("defaultValue from state");
        console.log(this.sdefaultValue);

        var root = ReactDOM.findDOMNode(this._root);
        var input = root.querySelector('input');

        console.log("input from DOM");
        console.log(input);

        console.log("input value from DOM");
        console.log(input.value);

        if (input && defaultValue) {
            console.log("force setting manually")
            var s1 = moment(defaultValue, format).format("X");
            input.value = value;//no effect !!!
            input.ariaValuetext = "01/01/2021";//no effect !!!
            input.ariaValuenow = s1 + "000";//no effect !!!
            console.log("check after forcing")
            console.log(input) //no effect !!!
        }
    }

    /**
     * @param {Object} prevProps - the previous props of component
     * @description setDefaultValue if props changed
     */
    componentDidUpdate(prevProps) {
        console.log("componentDidUpdate")
        const {
            value,
            defaultValue,
        } = this.props;

        if (prevProps !== this.props) {
            this.setState({
                defaultValue: defaultValue,
                value: value,
            });
        }
    }

    /**
     * valudeChanged
     * @method
     * @param {Object} e - the event fired
     * @description fired when a value changed - check validators -
     * set the state of component - call callback to notify changed
     */
    onChange = (e) => {
        const {
            //callback,
            //name,
            readOnly,
        } = this.props;
        const value = e.value;
        if (readOnly) {
            return;
        }
        this.setState({
            value,
        });
        //callback({ name: name, value: value }, this, null);
    }

    /**
     * render
     * @description templates the component
     */
    render() {
        const {
            defaultValue,
            value,
        } = this.state;
        const {
            name,
            width,
            disabled,
            style,
            tabIndex,
            readOnly,
            //Extended by Telerik Component
            floatingLabel,
            fixedLabel,
            labelWidth,
            labelHeight,
            labelPosition,
            formatPlaceholder,
            weekNumber,
            format,
        } = this.props;
        const showFixedLabel = fixedLabel && labelPosition && !floatingLabel && (labelWidth || labelHeight);
        let display = "";
        let templateColumns = "";
        let templateRows = "";
        let w = labelWidth ? labelWidth : "auto";
        let h = labelHeight ? labelHeight : "auto";
        if (showFixedLabel) {
            display = "grid";
            switch (labelPosition) {
                case "top": templateRows = h + "px auto"; break;
                case "right": templateColumns = "auto" + w + "px"; break;
                case "bottom": templateRows = "auto" + h + "px"; break;
                case "left": templateColumns = w + "px auto"; break;
                default:
                    return;
            }
        }
        return (
            <div className="k-MyDatePicker-Container k-Theme-Palette-Primary"
                ref={(c) => this._root = c}
                style={{ ...style, display: `${display}`, width: `${w + 2}px`, height: `${h + 2}px`, gridTemplateColumns: `${templateColumns}`, gridTemplateRows: `${templateRows}` }}>
                {showFixedLabel &&
                    (<div className="k-MyDatePicker-Label" style={{ ...style, width: `${w}px`, height: `${h}px` }}>
                        {fixedLabel}
                    </div>)}
                <DatePicker style={{ ...style, width: `${width}px` }}
                    ref={(c) => this._datepicker = c}
                    defaultValue={defaultValue instanceof Date ? defaultValue : null}
                    className="k-MyDatePicker-DatePicker k-Theme-Palette-Secondary"
                    width={width}
                    formatPlaceholder={formatPlaceholder}
                    tabIndex={tabIndex}
                    label={floatingLabel}
                    name={name}
                    weekNumber={weekNumber}
                    disabled={disabled}
                    readonly={readOnly}
                    //weekCell={CustomWeekCell}
                    format={format}
                    onChange={this.onChange} />
            </div>
        )
    }
}

export { MyDatePicker };
const o = withTranslation()(MyDatePicker);
o.displayName = 'MyDatePicker';
export default o;


 

Stefan
Telerik team
 answered on 19 Jul 2021
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?