Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox in frontmatter does not work #243

Closed
Maduki-tech opened this issue Sep 1, 2023 · 4 comments
Closed

Checkbox in frontmatter does not work #243

Maduki-tech opened this issue Sep 1, 2023 · 4 comments

Comments

@Maduki-tech
Copy link

Hello,
I try to create a Habit Tracker, where i use the Checkbox in the Frontmatter. But the Calender View does not work with the Checkbox. I need to use a Number 0 and 1.

Is there a way to do this?

@aladmit
Copy link

aladmit commented Sep 2, 2023

Hey👋🏼 I was wondering the same thing. I found that plugin doesn't handle boolean values in frontmatter at the moment, so there is no way to do that by 'searchType: frontmatter'.

But! Obsidian Checkbox type can guarantee that field value always is going to be either true or false. It allows us to use text search safely and be sure data always going to look the same way.

My current calendar to track sport habit through checkbox looks like this:

searchType: text
searchTarget: 'stretching: true'
month:

@lazyguru
Copy link
Collaborator

lazyguru commented Sep 2, 2023

There is an open PR that solves this #177. Additionally, my fork has almost every open PR merged on it and I did a release that you can manually install: https://github.com/lazyguru/obsidian-tracker/releases/tag/v1.11.0

@Maduki-tech
Copy link
Author

Hey👋🏼 I was wondering the same thing. I found that plugin doesn't handle boolean values in frontmatter at the moment, so there is no way to do that by 'searchType: frontmatter'.

But! Obsidian Checkbox type can guarantee that field value always is going to be either true or false. It allows us to use text search safely and be sure data always going to look the same way.

My current calendar to track sport habit through checkbox looks like this:

searchType: text
searchTarget: 'stretching: true'
month:

Great this helped me. Works fine for me.

@ghost
Copy link

ghost commented Sep 10, 2023

Chiming in to say I ran into this issues (of booleans not being parsed correctly) and this fix would be helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants