oracle / oraclejet

Oracle JET is a modular JavaScript Extension Toolkit for developers working on client-side applications.
https://oracle.com/jet
Other
505 stars 115 forks source link

Not able to change firstday of the week in oraclejet datepicker #63

Open nishant07kumar opened 4 years ago

nishant07kumar commented 4 years ago

Hi,

I am not able to change firstday of the week in datepicker. seems like a bug in oracle jet libarary.

Thanks, Nishant Kumar

peppertech commented 4 years ago

It will change automatically based on the locale that is set for your application.

nishant07kumar commented 4 years ago

I wanted it to set regardless of locale. so suppose I want to set Wednesday as first day as per my requirement. Above issue is already a bug created in ojet. Although I got a workaround.

peppertech commented 4 years ago

Thanks for the update on your use case. This is not something that we support out of the box. If you can provide your workaround for others that may want to do a similar thing, that would be great.

nishant07kumar commented 4 years ago

Please See below

` bootstrap.whenDocumentReady().then(function () { ko.applyBindings(new SimpleModel(), newElement.get(0));

        ojcontext.getPageContext().getBusyContext().whenReady().then(function () {
            oj.BaseCustomElementBridge.getInstance(newElement[0])._WIDGET_INSTANCE.option("firstDayOfWeek", firstDayOfWeek);
        });
    }); `