Think I want to block my some members at Night per day or specific day.
How I can do using Wix Code?
You can create a page with a notification saying:
“The access to this content is not allowed between time-time” (Use a better message).
Then create a database of members that contains 2 fields:
userId (field type: text/reference to private members collection);
timeToBlock (field type: date & time).
Then on the site code panel, use wix-users to retrieve the current user id,
https://www.wix.com/corvid/reference/wix-users.html
Query the database with the current user id, and get the timeToBlock.
https://www.wix.com/corvid/reference/wix-data.html#query
Using JavaScript Date methods check if it’s time to block.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Methods
If it is time to block then redirect the user to the blocking message page using wix-location.
https://www.wix.com/corvid/reference/wix-location.html
to avoid querying the database on every single page, you can write the access times to the memory/session storage and query the DB only if the storage is empty:
https://www.wix.com/corvid/reference/wix-storage.html
Sir,pls try to put code.I am little bit confused.Pls sir.