How to disable the button after first click and i want the button click functionality after the day
NickName:Gobi Ask DateTime:2019-11-14T00:13:47

How to disable the button after first click and i want the button click functionality after the day

I want to create a button which will disable after clicks and enable next day, that is button will enable for single click for single day.

User will come to office and click button after clicking button gets disable and it only enable next day only.

Copyright Notice:Content Author:「Gobi」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58841221/how-to-disable-the-button-after-first-click-and-i-want-the-button-click-function

Answers
Ambrown 2019-11-13T16:25:40

There are a lot of ways to do this. One is in your ts file, you can add a HostListener \n\n\nexport class SampleComponent implements OnInit {\n @HostListener('window: click', ['$event'])\n onClick(ev) {\n const element = ev.target;\n if (element.classList.contains('classImLookingFor'){\n element.style.pointerEvents = 'none'\n // or if it's a button\n element.disabled = true;\n }\n\n }\n\n ...\n}\n\n\n\nYou can also put in your template <button [disabled]='current.date === date'>Date</button>",


More about “How to disable the button after first click and i want the button click functionality after the day” related questions

How to disable the button after first click and i want the button click functionality after the day

I want to create a button which will disable after clicks and enable next day, that is button will enable for single click for single day. User will come to office and click button after clicking

Show Detail

Disable button after click

I want to disable my button after I click it. I want to see it but I don't want to click again after clicked. İn Windows Phone 8 how can I do this? button1.isEnabled = false; //hide button. I don't

Show Detail

how to disable button after first click in javascript

I am new to C#. I have a save button inside InsertItemTemplate. I have used the following code to disable the button after first click in java script but its not even working for the first click pl...

Show Detail

Want a button to disable for 30 second after click and enable it automatically

I am on a project and this project needs to take randomly 16 bytes from random.org. I can take it from website and write this 16 bytes to a textedit. I also have a refresh button. Everytime this bu...

Show Detail

How to disable button on click and then call the click event after that

I have a button that is executing some insertion into the database. Problem is when user fills the form and click on the buttons more than one time insertion process executed multiple times. So i

Show Detail

how to disable a button after click first time

how to disable a button after click first time?

Show Detail

How to disable this button for 5 sec after first click?

In my code the button .getmore gets clicked on scroll down. It loads data from database.Works fine. I need to make it disable for 5 sec after every click. How can I set this delay timer? Or is it

Show Detail

disable form button after click

I want to disable a form submit button after it's clicked to prevent the form being submitted multiple times. I use the following code to disable the button and add a class that makes it appear dis...

Show Detail

Set a button to disable after the first click using css

I'm working on this form: https://app.couponreach.co/view-form/869/582 And I'm looking to disable the button after the first click. The only code I can add is a css code. Is that possible? I'm thin...

Show Detail

After click disable button

I have method that after click print my document. I want after click disable my button. I use document.getElementsByName("btnGreenCard")[0].disabled = true; but is not working. Button isn`t

Show Detail