Angular how to set min or max date in input type date ? How to set date input field’s max date to today ? Solution : You have to add this your TS file : Then in your template you add : Source
Articles taggés:Date
(SOLVED) getTime() is not a function ?
gettime is not a function : if you are using the function getTime() and you have the error getTime() is not a function (in javascript / Typescript ) that mean you are using the date as a String , so as a solution you must parse the Date. for that you can use this function […]
(SOLVED) TypeScript – Get difference between two dates in days
if you need to get the difference between two dates in days. you can use this function : if you are using the date as a String you can have this error getTime() is not a function ! so if you have this error try this solution
Solution for : Subtracting these two times (in 1927) giving a strange result ?
Problem : if you run the following program, which parses two date strings referencing times 1 second apart and compares them : The output is : Why is ld4-ld3 not 1 (as I would expect from the one-second difference in the times), but 353 ? If you change the dates to times 1 second later […]
Solution : Convert from a java.util.Date Object to a java.sql.Date Object : Date : Data Type
This is an example explain how to convert from java.util.Date Object to java.sql.Date Object
How to convert date into this ‘yyyy-MM-dd’ format in angular 2
If you want to convert current data into ‘yyyy-MM-dd’ format in .ts file. just see this tuto : In template: (.html) in typescript: (.ts) The date can be converted in typescript to this format ‘yyyy-MM-dd’ by using Datepipe and just add Datepipe in ‘providers’ array of app.module.ts. Like this: Read also : How to get […]
How to get the current year using typescript in angular 6
Angular get current year – typescript get current year : In you are using Angular and you need to get current year Try this code :