• Introduction
  • Getting Started
  • Vue 2 End of Support
  • Native Components
    • Animation
    • Buttons
    • Chartsupdated
    • Conversational UInew
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gauges
    • Grid
    • Icons
    • Indicators
    • Inputs
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Notification
    • PDF Processing
    • Popup
    • Progress Bars
    • Scheduler
    • ScrollView
    • Tooltip
    • TreeList
    • TreeView
    • Upload
  • Wrapper Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • FAQ
  • Troubleshooting

Getting Started with the Kendo UI Date Math

This guide provides the information you need to start using the Kendo UI Date Math—it includes instructions about the installation approach, how to import the required methods, and links to additional resources.

The Date Math Package is part of Kendo UI for Vue, a professional grade UI library with 100+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Installing the Package

To add the Kendo UI Date Math package, run the following command:

npm install --save @progress/kendo-date-math

Using the Package

  1. After successfully installing the Date Math, import the required individual functions from the package:

    import { weekInYear, addDays } from '@progress/kendo-date-math';
  2. Then you can perform the desired date manipulations. The following code snippet demonstrates how to calculate the week number, based on a given date, using the weekInYear function:

    const date = new Date(2000, 10, 10);
    const weekNumber = weekInYear(date);
    
    console.log(weekNumber);
    // Returns the week number of the corresponding date.
    

Dependencies

The Kendo UI Date Math package has no external dependencies.

Next Steps