Calendar control improvement

As discussed in #317