Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery daterangepicker using moment

  $(document).ready(function () {
         $('input[name="ETDsdt"]').daterangepicker({
            format: 'MM/DD/YYYY',
            singleDatePicker: false,
            showDropdowns: true,
            ranges: {
                'Today': [moment(), moment()],
                'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                'This Month': [moment().startOf('month'), moment().endOf('month')]

            },
         },
            function (start, end, label) {
                $('#ETDsdt').val(start.format('MM/DD/YYYY'));
                $('#ETDedt').val(end.format('MM/DD/YYYY'));
           }
        );
    });
Comment

PREVIOUS NEXT
Code Example
Javascript :: MSSQL JSON key value 
Javascript :: Update failed: ChunkLoadError: Loading hot update chunk app failed. 
Javascript :: javascript type checking 
Javascript :: what is state in react 
Javascript :: angular set attribute value dynamically 
Javascript :: javascript object properties 
Javascript :: lite youtube embed react 
Javascript :: impress.js cdn 
Javascript :: material ui change icon size on xs screen 
Javascript :: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. 
Javascript :: Webpack ReferenceError: process is not defined #871 electron vue 
Javascript :: react table className 
Javascript :: Remove an item by index position 
Javascript :: this function 
Javascript :: jest Cross origin http://localhost forbidden 
Javascript :: jasypt 
Javascript :: how to live reload a node js app 
Javascript :: window.open function 
Javascript :: webpack.config.js 
Javascript :: 9 + 10 
Javascript :: react pdf 
Javascript :: Append to the text in the <p tag 
Javascript :: remove duplicates in json in flutter 
Javascript :: create http request 
Javascript :: javascript array destructuring 
Javascript :: grouped bar charts in chart js 
Javascript :: link external file by url using javascript 
Javascript :: handle bar 
Javascript :: javascript array find case insensitive 
Javascript :: what is an arrow function and how is it used in react 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =