Git Product home page Git Product logo

enessfk / ionic-calendar-app Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 2.88 MB

:calendar: IonCalendar - A basic calendar application that can schedule and display events with month, week, and day views built with the Ionic Framework.

License: MIT License

JavaScript 6.71% TypeScript 50.58% HTML 18.22% SCSS 24.48%
ionic-framework angular mobile-app ionic calendar typescript events month-view day-view week-view

ionic-calendar-app's Introduction

Hi, I'm Enes 👋

                   

About Me :

  • 🔭 I’m currently working on something cool 😉
  • 🌱 I’m currently learning AWS, NodeJs and Flutter
  • 💬 Ask me about anything Python/JavaScript/Java or Django/React/Symfony/Ionic
  • 📫 How to reach me: [email protected]
  • 😄 Pronouns: He/Him
  • ⚡ Fun fact: I ❤️ playing the 🎸 and ♟️

java python python c# c GIT javascript android django symfony angular ionic mysql ubuntu linux .NET arduino raspberry-pi

ionic-calendar-app's People

Contributors

enessfk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ionic-calendar-app's Issues

how to slect serveral day per month

hello n
could you help to select several days in a month in a calendar, i don't succeed in doing that.
my code is :

listeValidation Accueil
{{username}} {{ madate| date:'fullDate':'':'fr' }}
selectionner
```

and my typescript code is :
import {Component, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
import { registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/locales/fr';
import {CalendarComponent} from "ion2-calendar";

@ViewChild(CalendarComponent)
@component({
selector: 'app-liste-validation',
templateUrl: './liste-validation.page.html',
styleUrls: ['./liste-validation.page.scss'],
})
export class ListeValidationPage implements OnInit {
username: string;
password: string;
date: Date;
type: 'string';
value: any;
private parameters: any;
private madate: Date ;

constructor(private route: ActivatedRoute, private router: Router,private screenOrientation: ScreenOrientation) {
}

ngOnInit() {
registerLocaleData(localeFr);
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
if(localStorage.getItem('token')!=null && localStorage.getItem('username')!=null){
this.parameters=JSON.parse(this.route.snapshot.params.param);
this.username=this.parameters.username;
//this.date=this.parameters.date ;
console.log('le mot de passe vaut '+this.parameters.password);
}
else{
this.router.navigate(['login']);
}
}
onChange($event) {
// Vérifiez si $event est un tableau
if (Array.isArray($event)) {
this.parameters = $event.map(date => {
return {
date: new Date(date.getFullYear(),date.getMonth(),date.getDate()),
username: this.username,
};
});

  // Ajoutez cette vérification pour voir si le tableau est vide
  if (this.parameters.length > 0) {
    this.madate = this.parameters[0].date;
  } else {
    this.madate = null; // ou toute autre valeur par défaut appropriée
  }
} else {
  // Si $event n'est pas un tableau, traitez-le comme une seule date
  this.parameters = {
    date: new Date($event.getFullYear(),$event.getMonth(),$event.getDate()),
    username: this.username,
  };
  this.madate = this.parameters.date;
}
console.log(this.parameters);

}

selectionner(key: string, value: string){
console.log(this.parameters);
const param=JSON.stringify(this.parameters);
if (localStorage.getItem('token') != null) {
this.router.navigate(['/presence/', {param}]);
}
}
markDisabled = (date: Date) => {
const current = new Date();
return date < current;
};

// openCalendar() {
// const options = {
// canBackwardsSelected: true,
// defaultDateRange: this.date,
// pickMode: 'range'
// };
// let myCalendar = this.modalCtrl.create(CalendarModal, {
// options: options
// });
//
// myCalendar.present();
//
// myCalendar.onDidDismiss((date, type) => {
// if (date) {
// this.date = date;
// }
// });
// }
// eslint-disable-next-line @typescript-eslint/member-ordering
calendar = {
dateFormatter: {
formatMonthViewDay(date: Date) {
return date.getDate();
},
formatMonthViewDayHeader(date: Date) {
return 'formatmonthView';
},
formatMonthViewTitle(date: Date) {
return 'formatMonth';
},
formatWeekViewDayHeader(date: Date) {
return 'formatWeek';
},
formatWeekViewTitle(date: Date) {
return 'testWT';
},
formatWeekViewHourColumn(date: Date) {
return 'HourWeek';
},
formatDayViewHourColumn(date: Date) {
return 'HourDay';
},
formatDayViewTitle(date: Date) {
return 'FormatDay';
}
},
mode: 'month',
currentDate: new Date(),
locale: 'fr-FR'
};
optionsMultiSelect = {
pickMode: 'multi'
};

ngOnDestroy() {
this.screenOrientation.unlock();
}
}

how to do this  ?
Cordially

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.