2

Is there any way to change output of mat datepicker component? Currently it is date string but I need timestamp.

1 Answer 1

1

You can convert the output as timestamp by

toTimestamp(strDate){
 var datum = Date.parse(strDate);
 return datum/1000;
}

const outputTimeStamp = this.toTimestamp(output)// output is your output from datepicker
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.