jQuery Deprecation warning on DateTimePicker

88
July 16, 2019, at 3:40 PM

I upgraded jQuery from 1.11.1 to 3.4.1.

In DateTime control, the date are not loaded/saved as it should be.

In the console, something was raised, and says the following:

moment-with-locales.min.js:1 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info. Arguments: [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 07/16/2019, _f: undefined, _strict: false, _locale: [object Object] Error

at Function.createFromInputFallback (http://test.com/_layouts/15/siteS/DatePicker/js/moment-with-locales.min.js:1:3368)

at va (http://test.com/_layouts/15/site/DatePicker/js/moment-with-locales.min.js:1:21539)

at Sa (http://test.com/_layouts/15/site/DatePicker/js/moment-with-locales.min.js:1:22250)

at Ha (http://test.com/_layouts/15/site/DatePicker/js/moment-with-locales.min.js:1:22332)

at l (http://test.com/_layouts/15/site/DatePicker/js/moment-with-locales.min.js:1:209)

at y (http://test.com/_layouts/15/site/DatePicker/js/bootstrap-datetimepicker.min.js:1:1363)

at da (http://test.com/_layouts/15/site/DatePicker/js/bootstrap-datetimepicker.min.js:1:16347)

at Object.l.maxDate (http://test.com/_layouts/15/site/DatePicker/js/bootstrap-datetimepicker.min.js:1:25098)

at String. (http://test.com/_layouts/15/site/DatePicker/js/bootstrap-datetimepicker.min.js:1:22666)

at Function.each (http://test.com/_layouts/15/site/Scripts/jquery-3.4.1.min.js:2:2827)

Below is my javascript:

$('#dtDateOfRecord').datetimepicker({ locale: 'en-gb', format: 'DD/MM/YYYY', defaultDate: 
$('#hidDateOfRecord').val(), maxDate: '<%= DateTime.Today.ToString("MM/dd/yyyy") %>', 
ignoreReadonly: true });

    //date of record
    var dateOfRecord = document.getElementById('dtRecord');
    if (dateOfRecord.value == "") {
        $("#divDateOfRecord").addClass('has-error has-feedback');
        haveError = true;
    }
    else {
        $("#divDateOfRecord").removeClass('has-error has-feedback');
    }

I read from the documentation that formatting has to be changed, at the following: https://momentjs.com/docs/#/parsing/

But I am not sure how I can apply them to my situation.

I appreciate any help given.

READ ALSO
In amcharts, is there any way to show tooltips text according to condition?

In amcharts, is there any way to show tooltips text according to condition?

I want to show tooltips text in the chart according to my conditionIf my text value is 0 then I want to hide text otherwise show the text of the tooltip

48
Are complex functions plots possible in jsx graph?

Are complex functions plots possible in jsx graph?

Suppose one attempts to plot the complex valued function $f:\mathhbb{C} \to \mathhbb{C}$ as $f(z) =z$ in jsx graphIt may not be complicated as it appears

47
Document Management System/Libraries

Document Management System/Libraries

I am looking for a document management library with basic functionalists like searching, entitlementsPreferably in java

58
Aws S3 asynch file tracking

Aws S3 asynch file tracking

Using AWS Java SDK, TransferManager API is used for uploading asynchronously multiple files to AWS S3

43