Related Articles
DATEPICKER
1. npm install ng2-datepicker –save 2. import in app.module.tsimport { NgDatepickerModule } from ‘ng2-datepicker’;imports: [NgDatepickerModule] 3. import nelow in component.tsimport { DatepickerOptions } from ‘ng2-datepicker’;import * as frLocale from ‘date-fns/locale/fr’; 4. Before constructore add below code:date:any=new Date(Date.now());options: DatepickerOptions = {minYear: 1970,maxYear: 2030,displayFormat: ‘MMM D[,] YYYY’,barTitleFormat: ‘MMMM YYYY’,dayNamesFormat: ‘dd’,firstCalendarDay: 0, // 0 – Sunday, 1 – […]
DIFFERENCE BETWEEN TWO DATES
$date_a = new DateTime(‘2010-10-20 08:10:00’); $date_b = new DateTime(‘2008-12-13 10:42:00’); $interval = date_diff($date_a,$date_b); echo $interval->format(‘%h:%i:%s’);
TEMPLATE SETUP IN ANGULAR
1. Create an Angular App using angular CLIng new angular-templat 2. copy all the files and folder and paste it in the src > assets folder expect the HTML file. 3. Then include your all css files into the angular.json file like this ex.“styles”: [ “src/styles.css”, “src/assets/css/custom.css”, “src/assets/vendor/bootstrap/css/bootstrap.min.css”, “src/assets/vendor/font-awesome/css/font-awesome.min.css”, “src/assets/css/fontastic.css”, “src/assets/css/grasp_mobile_progress_circle-1.0.0.min.css”, “src/assets/vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css”, “src/assets/css/style.default.css” ], 4. […]