mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
web: added change date created functionality
Signed-off-by: Muhammad Ali <alihamuh@gmail.com>
This commit is contained in:
@@ -200,7 +200,10 @@ function Properties(props) {
|
||||
showMonthDropdown
|
||||
showYearDropdown
|
||||
selected={startDate || item.value(session[item.key])}
|
||||
onChange={(date) => setStartDate(date)}
|
||||
onChange={async (date) => {
|
||||
setStartDate(date);
|
||||
await noteStore.dateCreated(sessionId, date);
|
||||
}}
|
||||
dropdownMode="select"
|
||||
timeInputLabel="Time:"
|
||||
dateFormat="MMM d, yyyy, h:mm aa"
|
||||
|
||||
@@ -129,6 +129,12 @@ class NoteStore extends BaseStore {
|
||||
});
|
||||
};
|
||||
|
||||
dateCreated = async (id, dateCreated) => {
|
||||
await db.notes.add({ id, dateCreated });
|
||||
this._syncEditor(id, "dateCreated", dateCreated);
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
lock = async (id) => {
|
||||
await Vault.lockNote(id);
|
||||
this.refreshItem(id);
|
||||
|
||||
Reference in New Issue
Block a user