I am trying to use the “Use Filename as Default Date” option in the Tasks plugin. But it does not seem to work.
Things I have tried
I followed this doc section in the Tasks docs. I have a file name in my vault, which is named 2025-01-05 1.md. The Folders setting is not enabled (i.e. the whole vault is searched for tasks).
With all these premises the Scheduled field in the tasks creation window is empty.
It seems to work for me, but not in all circumstances. i.e. the filters are aware of this convention but not universally. In no circumstances is the Start date explicitly filled in from the filename in my experience.
Note that unlike the YYYY-MM-DD and YYYYMMDD date formats, this setting does not support prefixes or suffixes in file names at this time. The custom additional date format must be an exact match to the file.
I don’t know because I don’t use the feature. But can you share some examples of your file names?
rusobs showed a file that had an extra " 1" in the file name. I wonder if that counts as a “suffix”. Maybe the filename has to be exactly - and only - the date? (Just a guess.)
The “Open Today’s Daily Note” pluggin uses the YYYY-MM-DD format, so this is compliant.
I’ve made a mistake though, as I thought that the auto date was used for the start date. I’ve just checked in the config and it’s used for the Scheduled Date, not Start Date. So I withdraw my bug claim.
I’ve just double checked, and the ‘Scheduled Date’ is automatically being filled in from the filename. I confirmed that by looking at the task in the task editor modal. Please note though that once any date is set explicitly on a task the auto date is dropped.
That will likely be the origin of his problem. The date must match exactly, however, there is an option for a user specified filename format. Perhaps he can use this for his usecase.
@rusobs , the example you showed earlier had an extra " 1" after the date. This indicates that you’ve already got a file named with that specific date, and it’ll throw off the date recognition when working with the extra copy.
@holroy I’ve created a new file, named it 2025-03-13.md. There are no other files which have this name in my vault and include any suffixes or prefixes. This was to test if removing the suffixes fixes the problem. It does not.
It appears that others do not have this problem, and if myTasks plugin settings are correct, this must an issue with my set up. Help with identifying this issue is appreciated.
I’ve never had to add ‘.md’ to my filenames in Obsidian. (I’m sure it does that under the bonnet as am implimentation detail). It you were to explictly call your file ‘2025-03-13.md’ it would likely call the file on the filesystem ‘2025-03-13.md.md’ and that definitely would not match the prescribed date format.
@Infiniverse sorry for the confusion. the file name is 2024-03-13. There is no .md in the name of the file. But in macOS Finder app the file is shown as 2024-03-16.md
@Infiniverse others in this thread pointed that it works for them. it does not work for me. Perhaps someone had this same problem, let’s wait see. It is likely that some other plugin I have affects the Tasks plugin.
I’ll try removing the plugins one by one, and see if I can identify which one is the affecting one.