It depends on what you want from your calendar. If you simply want a way to keep track of time, then you can base it on anything you like. The earth spinning on its axis, the moon orbiting the earth, and the earth orbiting the sun are irrelevant.
However, most calendar systems were developed to help synchronize human activity here on earth to the seasons. Those seasons repeat in a cycle synchronized with the earth orbiting the sun. For this reason, the concept of a year was ultimately important in early calendar systems. For example, when it had been winter for a while and then got warmer, you wanted to know whether it's really spring and time to plant crops, or was it just a fluke temporary warmup and winter wasn't over yet. A year-synched calendar can answer that question.
Note that ultimately keeping track of where you are within a year doesn't mean you have to measure that directly. Years aren't so easy to measure accurately by lay people. Days and lunar cycles are. You can have a time-measuring system that is based on days and/or lunar cycles, that ultimately advances you thru the yearly calendar.
Unfortunately, there aren't integer days or lunar cycles in a year, so you have to fudge something occasionally. The usual way is to add or drop whole cycles of whatever you are measuring so that you stay synchronous to the yearly cycle in the long term. This is the whole point of our modern leap years. If I remember right, the jewish calendar is based on measuring lunar cycles, and uses leap months to stay in sync.
Nowadays, we have defined the second as the standard time measure, independent of earth's rotation (which changes over time). A minute is defined as 60 seconds, an hour as 60 minutes, and a day as 24 hours. This is very close to the earth's rotation time, but not exactly. We add or drop a second at the end of the year as needed to re-sync to the earth's actual rotation.
If you don't care about easily knowing where you are within earth's seasons, then you don't need to base your calendar on the earth's orbit around the sun. A colony on Mars, for example, might use a different calendar for every day use.