Aaron and Kara Shelhamer were divorced on October 7, 2009. Included in the divorce decree was a permanent parenting plan establishing joint custody of the children. Since that time, difficulties and disputes have persisted. On July 12, 2012, *153Aaron Shelhamer filed a motion seeking an order holding Kara Shelhamer (hereinafter “Shelhamer”) in indirect civil contempt for allegedly failing to comply with the parenting plan and subsequent court orders.
The district court held an evidentiary hearing on the contempt motion and subsequently found Shelhamer in contempt. The relevant portions of the journal entry state:
“The court finds that [Shelhamer] is in contempt as to the June 2, 2012 parenting time allegation; the parties agreed to the modification to 11 a.m. of the exchange time and [Shelhamer] was not on time for this exchange. . . . The court finds that [Shelhamer] is in contempt for failing to provide to the Petitioner/father the weekly update mandated by the existing court orders .... The court finds . . . that [Shelhamer] is in contempt for failing to honor the statutory court order to foster the relationship between the Petitioner/father and the minor children, . . . The court finds and orders that he is not going to put up with similar actions. . , . The court finds and orders that [Shelhamer] is sentenced to six months in the Sedgwick County jail. The court hereby suspends all but two days of that jail time. The jail time must be served within the next 30 days. The court hereby places [Shelhamer] on 12 months of probation with this court.”
Shelhamer then filed a motion to alter or amend the order along with a motion to stay the sentence. She argued that the district court erred by sentencing her to a determinate length of time in jail and by not providing her with an opportunity to purge herself of the contempt. At the hearing on Shelhamer s motion, the district court expressed its frustration with the constraints inherent to indirect civil contempt citations;
“I do not think the case law — and maybe I will get reversed, but I — who cares. I mean, I do care, but I just don’t envision that the law is that if you violate a court order . . . like in a divorce case, certain visitation times. If those are violated, no weekly updates .. . showing up habitually late for the parenting. . .. The judge’s hands are tied, . . . there can be basically no real penalty in contempt. I just don’t think that that’s what the law stands for. And what the Court of Appeals I think appreciates, I hope, and die Supreme Court is, is that it is extremely difficult to get the parties in family law cases to comply with the orders. That it is vitally important that trial court judges have the ability to enforce their orders.”
Then, in an attempt to modify its order to conform to existing caselaw requiring that a person subject to indirect civil contempt *154be given the ability to purge herself or himself of the contempt, the district court ruled as follows:
“So I will deny [Shelhamer’s] motion and require her to either immediately surrender herself to the Sedgwick County jail and remain there until she can provide proof to the court that she is providing the weekly updates, that. . . the next parenting time that the children are provided to Dad on time, and that there is no further derogatory comments made to die children or actions by [Shelhamer] to undermine the relationship between the minor children and [their father], or ... I will allow [Shelhamer] to do die two days in jail, per my previous order.”
Seeking clarification of this order, Shelhamer s counsel asked, “[H]ow are we supposed to comply with this order so that she does not have to spend any time in jail?” To which the district court replied:
“I understand this is difficult, but I am not going to allow that to turn court orders in family law cases into just so much fluff that’s non-binding, diat’s optional, that parties can willy-nilly mess with die other, mess over what’s in die children’s best interest, and dien give the court a big raspberry. . . . [T]his trial court judge is not going to stand for that.... I don’t think that tiiat’s what die law of contempt stands for, either. I think it stands for parties are going to comply witii court orders or diey are going to face the sanctions of the court, to include jail time.”
As such, die district court ordered that Shelhamer immediately report to jail and that she “stay in jail until the next parenting time.” At that point she could purge herself of the contempt by providing to the court “proof of the weekly updates, . . . proof the children are exchanged at the appropriate time next time, and make sure that there’s no derogatory words, comments, things that undermine the parent — the father’s parental relationship.” The district court then reiterated that Shelhamer had the option to “show up for the two days as previously ordered. I would be willing to do tiiat in exchange for immediate commitment to jail.”
The district court denied Shelhamer’s request to stay the sentence and she then opted to serve the 2 days in jail. This appeal followed.
We apply a dual standard of review to any appeal from a finding of contempt of court. We review de novo the trial court’s determination that tire alleged conduct constitutes contempt, while we review the impositions of sanctions for abuse of discretion. In re *155M.R., 272 Kan. 1335, 1342, 38 P.3d 694 (2002). When a judicial action is premised on an error of law it is by definition an abuse of discretion. Northern Natural Gas Co. v. ONEOK Field Services Co., 296 Kan. 906, 935, 296 P.3d 1106 (2013). Shelhamer has not challenged the district court’s ruling that her conduct constituted contempt. She asks only that her sentence be set aside. As such, the only question before us is whether the district court abused its discretion in sanctioning Shelhamer.
“Courts exercise contempt powers in order to maintain decorum in all court proceedings, punish those who show disrespect for the court or its orders, and enforce its judgments.” In re J.T.R., 47 Kan. App. 2d 91, 94, 271 P.3d 1262 (2012). Kansas statutes create two classes of contempt, direct and indirect. Direct contempt is committed in tire presence of the judge, while all other forms of contempt are denominated as indirect contempt. See K.S.A. 20-1202. In this case Shelhamer’s contempt was indirect as it occurred outside the presence of the judge.
Contempt cases are further delineated as either criminal or civil by the character of the sanction imposed. “Civil contempt proceedings are remedial in nature and designed to advance the private right of a litigant won by court order. Any civil contempt penalty is intended to be coercive, and relief can be achieved only by compliance with the order.” In re J.T.R., 47 Kan. App. 2d at 95. The parties and the district court all agree that Shelhamer was sentenced in a proceeding for indirect civil contempt. In such cases, the sanction is intended to be remedial and must furnish the contemnor the “keys to the jailhouse door” and allow her to purge her contempt at any time by complying with the order in question.
On the other hand, sanctions for criminal contempt are intended to punish the contemnor for disobedience or disrespect to the court. Conduct that may give rise to sanction for criminal contempt is “ ' “directed against the dignity and authority of a court or a judge acting judicially, with punitive judgment to be imposed in vindication; its essence is that the conduct obstructs or tends to obstruct the administration of justice.” ’ ” State v. Jenkins, 263 Kan. 351, 358, 950 P.2d 1338 (1997).
*156These subcategories of contempt are not mutually exclusive. Criminal or civil contempt can arise both in and out of the presence of the judge. Likewise, each can arise in the context of either an underlying criminal or civil action. Importantly, however, when a court undertakes to punish in criminal contempt, “tire due process rights that attend any criminal charge should apply.” In re J.T.R., 47 Kan. App. 2d at 101. These include the rights to notice; to court-appointed counsel if indigent; to trial; to confront witnesses; and to invoke the privilege against self-incrimination.
In Goetz v. Goetz, 181 Kan. 128, 138, 309 P.2d 655 (1957), our Supreme Court set down the fundamental principle which guides our review of Shelhamer’s sentence:
“ ‘If the sentence is limited to imprisonment for a definite period, the defendant is furnished no key, and he cannot shorten tire term by promising not to repeat the offense. .Such imprisonment operates, not as a remedy coercive in its nature, but solely as punishment for the completed act of disobedience.’ ’’
In other words, a “punitive jail sentence as punishment for violation of [a court order] is available only for criminal contempt, not for indirect civil contempt.” In re J.T.R., 47 Kan. App. 2d at 98.
Here, Shelhamer'® sentence was clearly punitive as it was for a definitive period of time, Shelhamer’s lawyer specifically asked the district court how Shelhamer could avoid serving jail time and was told, essentially, that Shelhamer could not avoid jail time. The district court’s intent was not to coerce but to punish. It makes no difference that the district court provided Shelhamer with the choice between two sentences, each of which included a determinate time in jail. Shelhamer was never given tire keys to the jailhouse door.
Kansas appellate courts have repeatedly reversed such punitive sentences when imposed in the context of civil contempt proceedings, See, e.g., Goetz v. Goetz, 181 Kan. 128 (90-day jail sentence for failing to turn custody of children over to the father erroneous because there was no availability to purge the contempt); In re J.T.R., 47 Kan. App. 2d 91 (5-day jail sentence for disobeying a no-contact court order was punitive as there was no way to purge the contempt); In re Conservatorship of McRoy, 19 Kan. App. 2d 31, *157861 P.2d 1378 (1993) (30-day jail sentence for failing to disclose conservator accounting punitive due to lack of opportunity to purge contempt); and Carlson v. Carlson, 8 Kan. App. 2d 564, 661 P.2d 833 (1983) (jail sentence of 48 hours to be served on 4 specific days for 12 hours per day for interference of ex-spouse’s visitation rights was wholly punitive).
We appreciate the district court’s frustration in this case. Likewise, we are mindful of the district court’s statement that in some cases it can be “extremely difficult to get the parties ... to comply with the [court’s] orders” and that it is “vitally important that trial court judges have the ability to enforce their orders.” This cannot, however, override the settled law of civil contempt.
Where a district court simply wants to punish a contemnor, the proper remedy is a proceeding in criminal contempt. The district court’s sentence of a determinate period for indirect civil contempt in this case was premised on an error of law and was, therefore, an abuse of discretion and must be set aside. Moreover, the record reflects that this case has become emotionally charged and frustrating to the district court. In the best interests of all the parties, we direct that on remand, all further proceedings be reassigned to a different district court judge.
Reversed and remanded with directions.