Showing posts with label js. Show all posts
Showing posts with label js. Show all posts

Calculate Fortnight Date

The following code will calculate a recurring fortnightly date from a given date, i.e. a star-date. The date format should be 'Y-m-d' for the following code. However, you can make updates in it as per requirements.

For example: The start date for the fortnight cycle date was set to be as "2018-01-10". Then, as per current cycle, next will be 2018-02-20.

Select an element by name with jQuery

You can use the attribute selector for selecting an element with its name.
For example if you have to select input with its name.