How to show entries which are live between dates regardless of postdate or expiry dates? I'm trying to show live entries to user by selecting list of months in a dropdown. Some my entries are live for 2 or 3 months. I having trouble in finding right method. I have tried using after and before but i think these work based on postdate of an entry. Correct me if i'm wrong. This all in template side.
"Live" is determined in part by postDate and expiryDate (in addition to status), so not technically independent, but this may be what you're after. You would still use the technique described in Carlcs' answer, only that the criteria would be searching the entries using the month values passed to your template.

{% if craft.request.param('startMonth') and craft.request.param('endMonth') %}

    {% set startMonth = craft.request.param('startMonth') %}
    {% set endMonth = craft.request.param('endMonth') %}
    {% set startDate = now|date(Y) ~ '-' ~ startMonth %}
    {% set endDate = now|date(Y) ~ '-' ~ endMonth %}

    {% set entries = craft.entries.section('mySectionHandle').postDate('and, &gt;= ' ~ startDate ~ ', &lt;= ' ~ endDate) %}

    {% for entry in entries %}
    ...
    {% endfor %}

{% endif %}


You could also use .after(starDate).before(endDate) for this.

Update If you want to get entries that are live during a particular month range (rather than posted during the month range) then you could check for postDate before the selected 'start month' and expiryDate after the selected 'end month'.

{% if craft.request.param('startMonth') and craft.request.param('endMonth') %}

    {% set startMonth = craft.request.param('startMonth') %}
    {% set endMonth = craft.request.param('endMonth') %}
    {% set startDate = now|date(Y) ~ '-' ~ startMonth %}
    {% set endDate = now|date(Y) ~ '-' ~ endMonth %}

    {% set entries = craft.entries.section('mySectionHandle').postDate('&lt;= ' ~ startDate).expiryDate('&gt;= ' ~ endDate) %}

    {% for entry in entries %}
    ...
    {% endfor %}

{% endif %}


Not tested.