That's a tough one. Obviously, if you were doing a standard x-y plot, you'd want the datetime axis to realistically represent time. Similarly, if you are doing a bar chart with fairly densely/uniformly spaced data.
In this case, perhaps the best bet is to plot against 1:numel(dates) and then update the axis labels with text representations of the timestamps:
t = datetime+calmonths([0 3 4 5 11 12]);
data = rand(size(t));
bar(1:numel(t),data)
xticklabels(string(t))