Ionic3-calendar weekday problem


#1

Hello everybody,

I have a problem with the plugin. the weekdays are from Sunday to Saturday. does anyone know a solution to display this from Monday to Sunday?

many thanks
Torsten


#2

Hello everybody,

I solved the problem.

Best regards
Torsten


#3

Hi sir,How to solve this problem,Please share here,Because most of developers need that.


#4

Hi karthikaivel,

I use the ionic3-calender-en and change the settings direct in js.

node_modules -> ionic3-calender-en -> src -> calendar -> calendar.js

function Calendar() {

this.weekHead = [‘MO’, ‘DI’, ‘MI’, ‘DO’, ‘FR’, ‘SA’,‘SO’]; // for me from Germany

}

and than

Calendar.prototype.createMonth = function (year, month) {

if (firstDay !== 7) {
var lastMonthStart = preMonthDays - firstDay + 1; // From the last few months start
for (var i = 1; i < firstDay; i++) { // i = 0 for SO firstday , i = 1 for MO firstday

}

if var I = 0 then the week begin with Sunday
if it set to 1 the week start at Monday

Best regards
Torsten
Germany